MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / ShrinkToFit

Method ShrinkToFit

Source/ThirdParty/rapidjson/internal/stack.h:113–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111 void Clear() { stackTop_ = stack_; }
112
113 void ShrinkToFit() {
114 if (Empty()) {
115 // If the stack is empty, completely deallocate the memory.
116 Allocator::Free(stack_); // NOLINT (+clang-analyzer-unix.Malloc)
117 stack_ = 0;
118 stackTop_ = 0;
119 stackEnd_ = 0;
120 }
121 else
122 Resize(GetSize());
123 }
124
125 // Optimization note: try to minimize the size of this function for force inline.
126 // Expansion is run very infrequently, so it is moved to another (probably non-inline) function.

Callers 5

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

Calls 4

EmptyFunction · 0.50
FreeFunction · 0.50
ResizeFunction · 0.50
GetSizeFunction · 0.50

Tested by

no test coverage detected