Re: [Harbour] Re: Collectible pointers

2008-02-02 Thread Marek Paliwoda
Marek Paliwoda pisze: And now the old item stored in h previously, does not belong to any item and it is freed by GC. Should be read as "to any place known to GC" or "to any host variable like : local,static,private,public,or hb_itemNew()". -- Marek --

[Harbour] Re: Collectible pointers

2008-02-02 Thread Marek Paliwoda
Hi Mindaugas, I expect pointer not to be collected, because it "lives" in variable h. No. Not always. See below ... What's wrong with my code? Read below ... PROC main() LOCAL h h := myfunc( h ) You call h := myfunc( h ). h is empty so hb_gcAlloc() is called in myfunc() and the resul