• Advertisement

Archived

This topic is now archived and is closed to further replies.

Dependencies in a class library

This topic is 5512 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am at the moment constructing a class library for C++ and I started thinking about dependencies in the library itself. For example I have one class that is supposed to log all memory allocation and deallocation. I have one class that handles array managment, it uses the memory logging for all memory it allocates and deallocates. I have one class that uses one of these arrays for storing a pointer to all open files. So the file library is dependant on the array library which in turn is dependant on the memory library. Should I try to remove all these dependencies withing the class library and only for example log memory that the developer using the engine allocates and not log memory that the library in itself allocates? However it makes life much easier if I can use the array library in the file class, and it does seem to make sense to log the memory that is allocated in the array class. Hope this makes sense.

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement