static void deleteThatHeap (void * p) { TheCustomHeapType * heap = (TheCustomHeapType *) p; heap->clear(); getMainHoardHeap()->free ((void *) heap); // Relinquish the assigned heap. getMainHoardHeap()->releaseHeap(); }
static void deleteThatHeap(void * p) { TheCustomHeapType * heap = reinterpret_cast<TheCustomHeapType *>(p); heap->clear(); getMainHoardHeap()->free(reinterpret_cast<void *>(heap)); // Relinquish the assigned heap. getMainHoardHeap()->releaseHeap(); }
// A special routine we call on thread exits to free up some resources. static void exitRoutine (void) { TheCustomHeapType * heap = getCustomHeap(); // Clear the TLAB's buffer. heap->clear(); // Relinquish the assigned heap. getMainHoardHeap()->releaseHeap(); }