1. 4FIPS
  4. CODE
  6. ABOUT

4FipS.com Forums

Forums dedicated to the projects hosted at 4FipS.com

Skip to content

Shared pointers, memory management & allocators

> About coding, hacking, photography, and such...

Shared pointers, memory management & allocators

Postby fips on Wed Sep 09, 2009 12:43 pm

I've been recently thinking about the right memory model for my latest game-related codebase and I've found this issue crucial when it comes to code reusability.

I'm not quite convinced that the obvious choice - Shared Pointers is the right way to go. The idea that the object ownership is spread across the system without explicit control isn't appealing to me anymore. Moreover, it seems to me now that really complex reusable data structures have to be free of the ownership management.

This thoughts bring me back to good old Raw Pointers!, however, combined with a custom allocator. The allocator would manage an underlying system of packages. So every new allocated object would be associated with a package, which would define object's lifetime.

User avatar
Site Admin
Posts: 160
Joined: Wed Nov 12, 2008 9:49 pm
Location: Prague

Shared pointers, memory management & allocators



Return to 4FipS.com General Discussion & Blog

Who is online

Users browsing this forum: No registered users and 1 guest