We fixed ximage.prg and included it in FWH2102.
Now ximage:Save( .t., cFile, ... ) properly saves the image as viewed including the freehand drawings.
We sent the revised ximage.prg to you by email.
Please confirm.
G. N. Rao.
Hyderabad, India
We fixed ximage.prg and included it in FWH2102.
Now ximage:Save( .t., cFile, ... ) properly saves the image as viewed including the freehand drawings.
We sent the revised ximage.prg to you by email.
Please confirm.
The main issue raised in the topic is "Resource Leakage."
The method oImage:CopyToClipboard() has apparent resource leakage because TClipBoard():SetBitmap( ohBmp ) has the leakage again because the C level function "SetClipboardData( CF_BITMAP, hBitmap ) )" has this "apparent" leakage.
In fact, there is no real leakage but CheckRes() reports it as leakage due to the way FWH internal functions mark a resource as created and released.
Fixed now, in FWH version 2102.
Hola Rao,
Confirmo de recibido el archivo, pero, al momento de enlazarlo con mi aplicación me hace falta esta función: FW_DrawShadow(), por lo que no pude comprobar si el problema de pérdida de memoria esta solucionado.
La versión de FWH que estoy utilizando es la de September 2019
Gracias por el apoyo para solucionar este problema de perdida de memoria.
Saludos cordiales.
Carlos
function FW_DrawShadow();return nil08-03-2021 10:28:42: C:\appsis\dev\sisgen.exe -- BMP,-855306115,TBITMAP:LOADIMAGE(826)->TBITMAP:DEFINE(282)->FICHACLINICA(8630)->(b)CLIE01(981)->TBTNBMP:CLICK(704)->TBTNBMP:LBUTTONUP(990)->TCONTROL:HANDLEEVENT(1791)->TBTNBMP:HANDLEEVENT(2030)->_FWH(3559)->DIALOGBOX(0)->TDIALOG:ACTIVATE(304)->CLIE01(1339)->(b)CLIECONS(4624)->TWINDOW:LDBLCLICK(2092)->TCONTROL:LDBLCLICK(1814)->TWBROWSE:LDBLCLICK(1229)->TWINDOW:HANDLEEVENT(0)->TWBROWSE:HANDLEEVENT(1801)->_FWH(3559)->WINRUN(0)->TMDIFRAME:ACTIVATE(1097)->TSSisMain:ACTIVAR(1472)->MAIN(102)
08-03-2021 10:28:42: C:\appsis\dev\sisgen.exe -- BMP,553980671,TBITMAP:LOADIMAGE(826)->TBITMAP:DEFINE(282)->FICHACLINICA(8631)->(b)CLIE01(981)->TBTNBMP:CLICK(704)->TBTNBMP:LBUTTONUP(990)->TCONTROL:HANDLEEVENT(1791)->TBTNBMP:HANDLEEVENT(2030)->_FWH(3559)->DIALOGBOX(0)->TDIALOG:ACTIVATE(304)->CLIE01(1339)->(b)CLIECONS(4624)->TWINDOW:LDBLCLICK(2092)->TCONTROL:LDBLCLICK(1814)->TWBROWSE:LDBLCLICK(1229)->TWINDOW:HANDLEEVENT(0)->TWBROWSE:HANDLEEVENT(1801)->_FWH(3559)->WINRUN(0)->TMDIFRAME:ACTIVATE(1097)->TSSisMain:ACTIVAR(1472)->MAIN(102)
08-03-2021 10:28:42: C:\appsis\dev\sisgen.exe -- CUR,65567,XBROWSENEW(16307)->HOJAGRAFICA(9437)->(b)BITACORAMEDICA(9020)->TBUTTON:CLICK(179)->TBUTTON:HANDLEEVENT(1755)->_FWH(3559)->SENDMESSAGE(0)->TDIALOG:COMMAND(433)->TWINDOW:HANDLEEVENT(0)->TDIALOG:HANDLEEVENT(1136)->DIALOGBOX(0)->TDIALOG:ACTIVATE(304)->BITACORAMEDICA(9023)->(b)FICHACLINICA(8809)->TBUTTON:CLICK(179)->TBUTTON:HANDLEEVENT(1755)->_FWH(3559)->SENDMESSAGE(0)->TDIALOG:COMMAND(433)->TWINDOW:HANDLEEVENT(0)->TDIALOG:HANDLEEVENT(1136)->_FWH(3559)->DIALOGBOX(0)->TDIALOG:ACTIVATE(304)->FICHACLINICA(8817)->(b)CLIE01(981)->TBTNBMP:CLICK(704)->TBTNBMP:LBUTTONUP(990)->TCONTROL:HANDLEEVENT(1791)->TBTNBMP:HANDLEEVENT(2030)->_FWH(3559)->DIALOGBOX(0)->TDIALOG:ACTIVATE(304)->CLIE01(1339)->(b)CLIECONS(4624)->TWINDOW:LDBLCLICK(2092)->TCONTROL:LDBLCLICK(1814)->TWBROWSE:LDBLCLICK(1229)->TWINDOW:HANDLEEVENT(0)->TWBROWSE:HANDLEEVENT(1801)->_FWH(3559)->WINRUN(0)->TMDIFRAME:ACTIVATE(1097)->TSSisMain:ACTIVAR(1472)->MAIN(102)
08-03-2021 10:28:42: C:\appsis\dev\sisgen.exe -- ====================================================================================================Because oImage:Save( .t., ... ) is working, you do not need to copy and paste to TBitmap/TImage object. We also advised not to do it.
In other words, you totally remove "oImage:CopyToClipBoard( .T. ), GuardarGraficaClinica( oImage, aImages )" and instead use oImage:Save()
As we also explained above, copying bitmap to clipboard is resulting in an apparent resource leakage but there is no real leakage. The bug is only in maintaining the internal count of resources by FWH. This is fixed in 2102.
Anyway, I shall be glad if you let me see your latest program (by email).
nageswaragunupudi wrote:Because oImage:Save( .t., ... ) is working, you do not need to copy and paste to TBitmap/TImage object. We also advised not to do it.
In other words, you totally remove "oImage:CopyToClipBoard( .T. ), GuardarGraficaClinica( oImage, aImages )" and instead use oImage:Save()
As we also explained above, copying bitmap to clipboard is resulting in an apparent resource leakage but there is no real leakage. The bug is only in maintaining the internal count of resources by FWH. This is fixed in 2102.
Anyway, I shall be glad if you let me see your latest program (by email).
karinha wrote:Holá, crea una cuenta en:
https://mega.nz/
Y un .RAR, ponga en el Mega Upload, e muestre el link de descarga aqui para testes.
Saludos.
Pregunta:
SetResDebug devuelve la fuga de memoria o de recursos?
Lo digo porque una fuga de memoria es cuando hacemos un hb_xgrab o un hb_itemNew y no se libera.
Para esto último Harbour está preparado solo hay que crear las librerías de Harbour con estadísticas, realmente solo afecta a hbvm.lib y a hbvmmt.lib.
Cuando quiero saber si hay fugas de memoria enlazo un de esas dos y al finalizar la ejecución del programa este genera un LOG con las perdidas.
Lo uso para la construcción de mis LIBs y asegurarme que no hay memory Leak.
Va de escándalo!!!!
Thanks for the information.
Here, the discussion is not at all about harbour memory leaks, but about the Windows resource leaks.
SetResDebug reports resource leaks.
xmanuel wrote:Pregunta:
SetResDebug devuelve la fuga de memoria o de recursos?
Lo digo porque una fuga de memoria es cuando hacemos un hb_xgrab o un hb_itemNew y no se libera.
Para esto último Harbour está preparado solo hay que crear las librerías de Harbour con estadísticas, realmente solo afecta a hbvm.lib y a hbvmmt.lib.
Cuando quiero saber si hay fugas de memoria enlazo un de esas dos y al finalizar la ejecución del programa este genera un LOG con las perdidas.
Lo uso para la construcción de mis LIBs y asegurarme que no hay memory Leak.
Va de escándalo!!!!
Total memory allocated: 107997 bytes (1109 block(s))
Warning, memory allocated but not released: 533 bytes (8 block(s))
fm.c:1242: HB_TR_ERROR Block 1 (size 52) NEW(0), "402CA500A02F9C0020319C00102F9C0000000000302C9C0000000000000000000000000000000000000000000000000000000000"
fm.c:1242: HB_TR_ERROR Block 2 (size 40) NEW(0), "10319C0010319C00B08C600001000100008000000400EEFFA02E9C00000000000000000000000000"
fm.c:1242: HB_TR_ERROR Block 3 (size 288) NEW(0), "0000000000000000508A9900000000000000000001000100000000000100F1FF30BB980000000000C88A9900000000000000000001000100000000000100F0FFC82B98000000000000000000000000000000000001000100000000000100EFFF0000000000000000B88B9900000000000000000001000100000000000100EEFF7830980000000000308C9900000000000000000001000100000000000100EDFFA8B598000000000000000000000000000000000001000100000000000100ECFF000000000000000070879900000000000000000001000100000000000100EBFFD0C198000000000038859900000000000000000001000100000000000100EAFF"
fm.c:1242: HB_TR_ERROR Block 4 (size 32) NEW(0), "902E9C00902E9C00E078600000000000102D9C000C0000000C00000001000000"
fm.c:1242: HB_TR_ERROR Block 5 (size 44) NEW(0), "0000000000000000000000000100000001000000000000000000000001000000010000000000000028309C00"
fm.c:1242: HB_TR_ERROR Block 6 (size 10) NEW(0), "RDLSQLITE."
fm.c:1242: HB_TR_ERROR Block 7 (size 24) NEW(0), "00146000C014600060C8650040106000E0106000E0116000"
fm.c:1242: HB_TR_ERROR Block 8 (size 11) CONNECT(0), "hdodemo.db."karinha wrote:Carlos, teste ahora:
https://mega.nz/file/FM0AmApQ#jJ90yf7JJkrs7ktZn_EPaI3-VLWbpm2KIKhY63tLO4o
Regards, saludos.