
On Jul 31, 2005, at 9:58 AM, MenTaLguY wrote:
On Sun, 2005-07-31 at 11:31 +0200, Jasper van de Gronde wrote:
Out of curiosity, any specific reasons for not using smart pointers? (I'm not saying that I think you should, just interested in general reasons not to use them) Or is it just a matter of not wanting to put smart pointers into the mix of explicitly managed memory and garbage collected memory that already exists (if I understood correctly).
That and the fact that smart pointers invariably introduce a high hidden performance cost, yes.
And in general, unless a language was designed with garbage collection to begin with, it's very difficult to retrofit it. Smart pointers try to hide a lot of details from the developers. Sometimes that's good. But then sometimes hiding those details causes more problems that it fixes (especially if you think of developers thinking alloc stuff is now magically taken care of, and thus not taking enough care on the edge cases, etc).