Hi,
IMO this method is better, because the C object will
be automatically destroyed when the var goes out of
scope. Basically there is no need to manually destroy
the object so there is also no possibility to forget
it by mistake and cause resource/memory leakage.
This is a very nice feature of hb_retptrGC().
Brgds,
Viktor
On 2008.10.25., at 13:45, Budyanto Dj. wrote:
Hi Przemek,
Thanks for these GREAT innovations of yours. I am now having a big
hope into the future :-)
After learning some of your test programs, I have some notes though.
In your tests/gtwin.prg I learn this:
pGT1 := hb_gtCreate( THREAD_GT )
which opens a new GT/window.
And then later:
pGT1 := NIL
to destroy the GT/window.
Please excuse my ignorance..., but what do you think about
hb_gtDestroy(pGT1) instead of
this NIL assignment?
Closing a window by assigning NIL to a local variable looks very
strange to me.
In fact to close the window I can assign anything to pGT1: 1234,
"ABCDE", {}, anything.
Isn't it a bit "dangerous?"
Another strange situation:
//assign pGT1 to another var:
a := pGT1
//this won't close the window now:
pGT1 := NIL
//but this will:
a := NIL
Strange isn't it?
regards,
budyanto
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour