Reference counting and weak pointers

Reference counting and weak pointers

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Reference counting and weak pointers

Post by jcnossen »

Not exactly new stuff, but none of the AIs are using them. Especially in an environment with a lot of dynamically allocated objects, they can be very useful and make things a lot more stable. I'm still wondering why I didn't use it for JCAI...

Anyway I just wanted to point out that I think these things would help all AIs...

If you want an idea of how to implement it take a look at http://www.cbloom.com/3d/techdocs/smart_pointers.txt
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

NTai makes extensive use of boost_shared_ptr, and I have to say its made memory management a lot less painful.
Post Reply

Return to “AI”