Hi Viktor,

Similarly to hb_parptr() it stores pointer,

No, it retrieves pointer, not stores it.

> but unlike hb_parptr() you can attach a callback function

No, you do not attach a callback function in hb_parptrGC.
Attachement is done inside hb_gcAlloc(). See the sources.

to the variable, which will get control when the
Harbour level variable will be released, and last
but not least the memory associated with the pointer
(allocated using hb_gcAlloc()) will be freed automatically.
[...]

Victor, you do not need to explain me how "finalizers"
work, because I am an author of an original idea, and
I have introduced them in xhrabour firstly.
In fact I have developed them for harbour just after
Ryszard introduced his excelent "mark-sweep" GC, but
at those times I had no chance to put it into harbour,
because I was not a harbour developer. Then Przemek has
ported them from xharbour to harbour, enhancing them
greatly :).

--

Marek

----------------------------------------------------------------------

Lezac w wannie skorzystala z ...
Kliknij >>> http://link.interia.pl/f1ce9
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to