Hi Przemek,
I do not want to remove it yet because I can imagine some interesting
functionality for it without touching HB_ITEM internals though it will
be necessary to add one additional function for it: hb_gcMark( pGCBlock ).
And this is the reason why I asked about it. Does anyone created some
code which uses extensively pure GC blocks with cross references attached
to our GC system by hb_gcRegisterSweep() and his own hb_gcMark() function?
Marek you said that you are using mark/sweep functions extensively.
Is it only for marking external HB_ITEMs or for sth else.
You probably misunderstood me, or I was not clear enouch responding
to Mindaugas. In a post to Mindaugas I was refering to your proposition
of changing the following code :
ptr = hb_gcLock( hb_gcAlloc( ptr ) );
<initialization code>
hb_itemPutPtrGC( ptr, destructorFunc );
hb_gcUnock( ptr );
to
ptr = hb_gcAlloc( ptr );
<initialization code>
hb_itemPutPtrGC( ptr, destructorFunc );
Mindaugas responded that he supports such a decision because
the small amount of publicly available code uses this feature,
and I posted an info that I am using it for quite a long time.
Honestly speaking I did not use gcLock()/gcUnlock() pair, but
fortunately to me I was using gcAlloc()/itemPutPtrGC()/itemRelease()
thru MACROS, so it was an immediate fix to do it well :). Using
MACROS in my case, also causes that your proposition will not hurt
me at all too, so I am all for it and I support it :).
I was not reffering to using hb_gc(Un)RegisterSweep(), especially
to protect pure GC blocks, because unlike you, I cannot imagine
any funcionality where such a feature could be utilized, as oposed
to returning such a block to PRG level and to store it there. I'd
greatly appreciate if you could post any example of such a funcionality.
--
Marek
----------------------------------------------------------------------
Sprawdz gdzie lezy snieg, czy dzialaja armatki
i jak przygotowane sa stoki >>> http://link.interia.pl/f1cfc
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour