|
|
In article <3fdcd562@news.povray.org> , Warp <war### [at] tagpovrayorg> wrote:
> I don't really understand what smart pointers are useful for. In my
> opinion if you need to use a smart pointer, there's a flaw in your
> design.
You clearly haven't done a lot of GUI programming. If you acquire resources
from the operating system, it is usually a good idea to keep them in a
specialised container able to release the resource should i.e. an exception
occur. Likewise when it comes to passing data to the operating system.
Frequently this does require a more low-level work on manually allocated
memory with new, and then auto_ptr can be really helpful! *
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|