So, in the current rendering engine Im doing, I employed smart pointers (mainly boost::shared_ptr). It gives me lots of flexibility, as I dont need to care about mem and dont need to worry about getting my pointer corrupted all of sudden, and the data is really supposed to be shared around to avoid duplicates.
Than on the higher lvl module, who uses the "engine", I figured out Im obligated to use heap allocation even if I dont need (for example, if I know the max number of certain resource).
So, shared_ptr are already being very useful, but have this lil annoying detail..Say I have a Cache class or something who stores a fixed size of known data ( on a higher lvl ), that "cache" would control the mem for this one data, but I cant have this data shared with a shared pointer, so Im obligated to do heap allocations due a shared pointer...
Where did I "shit" myself on the foot? Shouldnt I ever use smart pointer on lower lvls modules?
I know that stuff like that should provide custom mem allocation mechanisms, but that subject is way over my head right now. Can anyone opine?