MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / ~SimpleHeap

Method ~SimpleHeap

source/SimpleHeap.cpp:175–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173
174
175SimpleHeap::~SimpleHeap()
176// This destructor is currently never called because all instances of the object are created
177// with "new", yet none are ever destroyed with "delete". As an alternative to this behavior
178// the delete method should recursively delete mNextBlock, if it's non-NULL, prior to
179// returning. It seems unnecessary to do this, however, since the whole idea behind this
180// class is that it's a simple implementation of one-time, persistent memory allocation.
181// It's not intended to permit deallocation and subsequent reclamation of freed fragments
182// within the collection of blocks. When the program exits, all memory dynamically
183// allocated by the constructor and any other methods that call "new" will be reclaimed
184// by the OS. UPDATE: This is now called by static method DeleteAll().
185{
186 if (mBlock) // v1.0.40.04
187 free(mBlock);
188 return;
189}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected