| 173 | |
| 174 | |
| 175 | SimpleHeap::~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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected