NewObjectBuilderWithCounter creates and instantiates ObjectBuilder with memory counter.
()
| 331 | |
| 332 | // NewObjectBuilderWithCounter creates and instantiates ObjectBuilder with memory counter. |
| 333 | func NewObjectBuilderWithCounter() *ObjectBuilderWithCounter { |
| 334 | ob := NewObjectBuilder(0) |
| 335 | return &ObjectBuilderWithCounter{ |
| 336 | ob: ob, |
| 337 | // initial memory allocation |
| 338 | size: unsafe.Sizeof(ob) + jsonInterfaceSize, |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | // Add appends key value pair to the sequence and updates |
| 343 | // amount of memory allocated for the overall keys and values. |
nothing calls this directly
no test coverage detected
searching dependent graphs…