On Destroying: WM_NCDESTROY
Last updated
Was this helpful?
Last updated
Was this helpful?
When the control is destroyed we free the memory we allocated and call a cleanup routine for any other business (if required). Note our _SB_Cleanup
function in our WM_NCDESTROY
message (shown below,) is called first whilst the memory for our variables/properties still exists - This is important in case we have to free any other resources, handles or objects that we have stored previously in our internal or external properties.
Our internal helper function __FreeMemProperties
used to retrieve the appropriate pointer for the internal and external memory blocks used to store our variables and then frees that memory with calls to .