L
Lloyd Dupont
I try to use the auto_ptr in my code but that doesn't work.
even std::auto_ptr.
I guess I have to add an #include statement, but I can't figure out the
right file to add.
Also I want to use auto_ptr not to manage a single int but and int array.
something like
std::auto_ptr<int> adv = new int[42];
but from what I read auto_ptr doesn't seems to be the right solution for the
job.
basically I want to use auto_ptr so if I have exception in a constructore or
in a method, all memory is cleanly deallocated.
without me bothering writing heaps of try/catch/finally
any tip?
I'm working in Managed C++
even std::auto_ptr.
I guess I have to add an #include statement, but I can't figure out the
right file to add.
Also I want to use auto_ptr not to manage a single int but and int array.
something like
std::auto_ptr<int> adv = new int[42];
but from what I read auto_ptr doesn't seems to be the right solution for the
job.
basically I want to use auto_ptr so if I have exception in a constructore or
in a method, all memory is cleanly deallocated.
without me bothering writing heaps of try/catch/finally
any tip?
I'm working in Managed C++