MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / ShrinkToFit

Method ShrinkToFit

rapidjson/internal/stack.h:100–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98 void Clear() { stackTop_ = stack_; }
99
100 void ShrinkToFit() {
101 if (Empty()) {
102 // If the stack is empty, completely deallocate the memory.
103 Allocator::Free(stack_);
104 stack_ = 0;
105 stackTop_ = 0;
106 stackEnd_ = 0;
107 }
108 else
109 Resize(GetSize());
110 }
111
112 // Optimization note: try to minimize the size of this function for force inline.
113 // Expansion is run very infrequently, so it is moved to another (probably non-inline) function.

Callers 4

GenericSchemaDocumentMethod · 0.80
ClearStackMethod · 0.80
ShrinkToFitFunction · 0.80
ShrinkToFitFunction · 0.80

Calls 2

EmptyFunction · 0.85
GetSizeFunction · 0.50

Tested by

no test coverage detected