|
|
|
|
|
by a_t48
703 days ago
|
|
Not sure if this is what GP was getting at, but in games a shared pointer (or similar custom resource handle) to something like a texture can be very useful - you want to share resources between objects in the scene so that you don't load a thing from disk when it's already in memory, but don't want to hold onto it forever to save RAM. |
|
Scope based ownership would be a unique_ptr that frees the heap memory when it goes out of scope (if it isn't moved).