quote:Original post by Scarface5013
yes i used new for this. so the answer seem to be delete.
and the pointer ??
A better method would be to use a smart pointer with an appropriate ownership policy. For example, if the class is the sole owner of the object pointed to, then auto_ptr<> would be suitable. You would set the auto_ptr during object initialisation, and deletion of the pointed-to data would be done automatically when the owner object is deleted. If auto_ptr''s ownership is unsuitable, then you can find more smart pointers at www.boost.org.
--
Very simple ideas lie within the reach only of complex minds.