Tutorial :Automatic pointer for Symbian


Is there any kind of automatic pointer, similar to auto_ptr or scoped_ptr, for Symbian?


Unfortunately, no. If you mean native Symbian C++, of course. I can only propose you to use template <class T> class TAutoClose, which can be used to call Close() method on different R-classes, when TAutoClose instance goes out of scope. For example,

RFile myFile;  TAutoClose<RFile> iFile;  iFile.iObj = myFile;  

myFile::Close() will be called when iFile goes out of scope.

Hope this helps. Symbian development is not the easy. :)

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »