Jump to content
  • Advertisement
Sign in to follow this  
Daniel Miller

OOP *help!*

This topic is 4886 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This question could win an award for how vague it is, but: What are some of the best ways to deal with the life of object-oriented objects in C++? If someone could come up with a better wording, please tell me. :) [Edited by - Daniel Miller on May 31, 2005 1:40:47 PM]

Share this post


Link to post
Share on other sites
Advertisement
garbage collection - finds objects that aren't need and destroys them at a convienient time.

smart pointers - deallocates objects once the pointer goes out of scope AND there are no other references to the objects.

scoping - using braces { and } around objects limits their life span

statics - an objects existence and life-span are shared among instances.

singletons - similar to statics, these are objects that have global access-points and only exist once.

multi-threading - if not done correctly can inadvertantly destroy an object it shouldn't.

Share this post


Link to post
Share on other sites
Quote:
Original post by Daniel Miller
Thanks, I think boost is the best way to go.

It looks like it'll work like a dream.


Boost's smart pointer is good. So is Loki::SmartPtr.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!