[redland-dev] implicit free
Norman Gray
norman at astro.gla.ac.uk
Fri Nov 25 14:51:55 CET 2011
Maxence, hello.
On 25 Nov 2011, at 13:04, Maxence Guesdon wrote:
> Thanks for your explanation. If I understand correctly:
> - there is smal additional cost (memory and cpu) due to copying,
Well yes, but no more than would be expected anyway in normal operation. A GC-based implementation would have object creating and copying being very cheap anyway.
> - sharing is prevented.
I'm not sure what you mean here. When the wrapper layer copies a librdf object it's done via a librdf function call, as Lauri mentioned. In many cases this will be implemented by incrementing a librdf-internal reference count, which means very little cost; and this wouldn't prevent sharing.
The problem I mentioned in the other message came about because one of these librdf copy operations was accidentally a shallow copy rather than a deep one, and if I recall correctly may have been only a documentation bug.
All the best,
Norman
--
Norman Gray : http://nxg.me.uk
More information about the redland-dev
mailing list