cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Check a object exists or not
Check a object exists or not
Nov 4, 2010 at 9:38am UTC
vsaurabh2
(10)
how can i check that a particular object still exist or it has been deleted ?
Thanks
Nov 4, 2010 at 9:42am UTC
closed account (
EzwRko23
)
You can't.
Nov 4, 2010 at 1:11pm UTC
Bazzy
(6281)
@OP
Can you be more specific?
Nov 4, 2010 at 1:37pm UTC
hamsterman
(4538)
Indeed you can't. The memory itself is not in any way different whether it's used or not.
You have to create such system which knows of this.
Say what is your problem exactly, if you want us to help you to come up with such system.
Nov 4, 2010 at 2:48pm UTC
PanGalactic
(1658)
Weak pointers. But they require that the object's lifetime be managed by shared pointers.
http://www.boost.org/doc/libs/1_44_0/libs/smart_ptr/weak_ptr.htm
Topic archived. No new replies allowed.