Jump to content
  • Advertisement
Sign in to follow this  
dave

A Smart Pointer That Works With STL?

This topic is 4901 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

Cos i know auto_ptr doesn't, wasn't designed to. So can anyone name one? or should i just program my own (which i COULD do). ace

Share this post


Link to post
Share on other sites
Advertisement
Is bossts shared_ptr the equivelent of auto_ptr, in operation? cos thats what im after ideally.

ace

Share this post


Link to post
Share on other sites
It is reference-counted. Which means that the object is automatically deleted when the last reference goes away. Its functionality is a superset of auto_ptr's.

Share this post


Link to post
Share on other sites
O so i got it downloaded but it appears to be a complete pain in the ass to get running with all the make files and stuff, according the the 'getting started' part of the website.

Anyone got any advice.

ace

Share this post


Link to post
Share on other sites
Quote:
Original post by ace_lovegrove
Anyone got any advice.


Only a few elements of the Boost library need to be compiled. If all you need are the shared pointers, just copy the 'boost' directory under your compiler's 'include' directory.

If you want further advice, you'll have to give me some information about your system (namely, what compiler you're using).

I still strongly suggest that you do read the "getting started" page carefully. You're a programmer, so RTFM. [grin]

Share this post


Link to post
Share on other sites
hahaha fair enough fruny, im just in an impatient mood with everything today, hehe

ace

Share this post


Link to post
Share on other sites
Just to throw in something else, I'm a bigger fan of Loki's SmartPtr than boost's smart pointer set. I don't think there's anything particularly better about Loki's default SmartPtr vs. boost::shared_ptr, but I prefer the added flexibility I get with 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!