I think I have discovered a bug in the TBitmap class. When calling oBmp:end() the oBrush object contained in the bitmap object is not released. I don't know if all bitmap objects contain a brush but I tried both normal and alpha bitmaps and there was an unreleased brush in both of them. Below is my test code.
This test was done with FWH 10.7.
Regards,
James
// Test to show unreleased brush in bitmap object
// Author: James Bott
// Date: 9/8/2010
#include "fivewin.ch"
Function Main()
local oWnd, oBmp
ferase("checkres.txt")
define window oWnd
oBmp:= TBitmap(,,,,,"c:\fwh\bitmaps\alphabmp\user.bmp",oWnd) // alpha bitmap
//oBmp:= TBitmap(,,,,,"c:\fwh\bitmaps\16x16\copy.bmp", oWnd) // regular bitmap
activate window oWnd
//oBmp:end() // doesn't release oBitmap:oBrush
// Need this to release oBitmap
if (! empty(oBmp:oBrush), oBmp:oBrush:end(),)
oBmp:end()
checkRes()
return nil