procedure DeallocateHWnd(Wnd: HWND);
extern DELPHI_PACKAGE void __fastcall DeallocateHWnd(HWND Wnd);
Frees a window that was created using AllocateHWnd.
Call DeallocateHWnd to free a window that was created using the AllocateHWnd function. Windows must be freed to release the system resources that they consume. You must call DallocateHWnd from the same thread as the corresponding AllocateHwnd call was made.
The Wnd parameter is the window handle of the window to be freed. This value is the same as the handle returned by the call to AllocateHWnd.
Warning: Do not use DeallocateHWnd on the handle of a windowed control. Windowed controls free their handles using the protected DestroyHandle method, which ensures that the control is left in a consistent state.