Original Post
Hello, I’m writing a game engine and there is a thing bothering me...i have a main object "root object" which acts as an interface for creating/removing other objects like the renderer, the file manager, windows and etc. The idea is these objects to be created only from this root object and not individually by the programmer...currently I’m making the object constructors and destructors protected and making the root object a friend class, however i think that this screws encapsulation and stuff...i was just wondering if there is a better way of doing that?