From: Richard Hadsell (hadsell_at_[hidden])
Date: 2003-02-18 18:52:00
Alisdair Meredith wrote:
>I am curious why the size of scoped_ptr matters so much?
>I certainly worry about the size of shared_ptr as I may store many of
>them in containers. However, this is not possible with scoped_ptr so I
>am curious about usage where size might still matter? [Whenever I think
>I have the hang of these things, someone goes and points out the obvious
>case I'm missing! The more you look into smart pointer, the more you
>understand why the debates never end!!]
Our application is a raytracing renderer. Storing data for each object
encountered in a scene that contains ~100,000 objects is a problem.
Some of the data are in scoped_arrays of scoped_ptrs. If we had to
double the size of those arrays just to get a feature that we don't
need, I would copy the current scoped_ptr code and make it my own.
I couldn't take the memory waste, even if it were only another 50 MB.
We work very hard in every other way to use memory frugally, so that we
can support larger scenes, which our users continually demand.
-- Dick Hadsell 914-259-6320 Fax: 914-259-6499 Reply-to: hadsell_at_[hidden] Blue Sky Studios http://www.blueskystudios.com 44 South Broadway, White Plains, NY 10601
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk