C
Qul::PlatformInterface::RestorableAllocationHandler Class
class Qul::PlatformInterface::RestorableAllocationHandlerThis class provides an interface to free and restore memory allocations. More...
| Header: | #include <platforminterface/memoryallocator.h> |
Public Functions
| virtual void | freeMemoryAllocations(Qul::PlatformInterface::MemoryAllocator::AllocationType allocationType) = 0 |
| virtual void | restoreMemoryAllocations(Qul::PlatformInterface::MemoryAllocator::AllocationType allocationType) |
Detailed Description
If you are using the MemoryAllocator API to allocate memory, and need to use the platform deinitialization feature, create a sub-class of RestorableAllocationHandler and override RestorableAllocationHandler::freeMemoryAllocations to release the allocated memory when requested.
Override RestorableAllocationHandler::restoreMemoryAllocations to restore memory allocations when requested. Only omit the override if some other mechanism restores the allocations, for example lazy loading.
Member Function Documentation
[pure virtual] void RestorableAllocationHandler::freeMemoryAllocations(Qul::PlatformInterface::MemoryAllocator::AllocationType allocationType)
Free memory allocations associated with the given allocationType.
[virtual] void RestorableAllocationHandler::restoreMemoryAllocations(Qul::PlatformInterface::MemoryAllocator::AllocationType allocationType)
Restore memory allocations associated with the given allocationType.
The default implementation is a no-op. Override this function to restore allocations released in freeMemoryAllocations when requested. Only omit the override if some other mechanism restores the allocations, for example lazy loading.
Available under certain Qt licenses.
Find out more.