Three (3) List classes to prevent memory leaks
Posted
by Simon Hughes
on July 13th, 1999
Here are two template classes and one normal class designed to prevent memory leaks.
CMyList (template)
This class is a wrapper for the CList MFC template class. It adds
extra functionality and allows its member items to serialise
themselves (important for schema versioning).
CMyTypedPtrList (template) my personal favourate
This class is a wrapper for the CTypedPtrList MFC template class.
The items pointed to will be properly deleted thus causing no memory
leaks.
CMyObList (standard class)
This class is a wrapper for the CObList MFC class.
The items pointed to will be properly deleted thus causing no memory
leaks.
Downloads
Download demo project - 9 KbDownload source - 3 Kb

Comments
Serialization update
Posted by Legacy on 07/20/1999 12:00amOriginally posted by: Simon Hughes
Reply