Am Mittwoch, 13. Juni 2007 schrieb Giel van Schijndel:
> Dennis Schridde schreef:
> > - Refcounting is probably even better.
>
> I like reference counting, in fact it is to my opinion both the safest
> and most efficient solution of all. However, I do think that unlike C++,
> which provides constructors and destructors, reference counting will not
> be easy to use. This is because before destroying a pointer (either
> because it leaves scope, or whatever other reason) you'd have to call a
> special destruction function (which decrements the refcount and if it
> reaches zero destroys the pointed to object in the appropriate way),
> each and every time a pointer becomes unused. Similarly each and every
> time you'd copy a pointer you'd have to make sure the reference count is
> increased. This may seem trivial, but applying this technique on every
> single pointer we've got is most certainly _not_ trivial.

Most prominent user of these smart-pointers would be the droid/projectile 
lists, where refcounting could probably "easily" be deployed.

--Dennis

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to