Please call DeleteObject to free up all system resources.
Sample Code:
Please add some!
Alternative Managed API:
Do you know one? Please contribute it!
The DeleteObject function deletes a logical pen, brush, font, bitmap, region, or palette, freeing all system resources associated with the object. After the object is deleted, the specified handle is no longer valid.