Added a comment regarding how the STL uses allocators.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403372
This commit is contained in:
Davis King 2010-01-09 16:36:36 +00:00
parent 80a9265b6d
commit 62041ca2e0

View File

@ -34,6 +34,12 @@ namespace dlib
Thus, using this allocator object you can use any of the dlib memory manager objects with Thus, using this allocator object you can use any of the dlib memory manager objects with
the contains in the STL or with any other object that requires a C++ allocator object. the contains in the STL or with any other object that requires a C++ allocator object.
It is important to note that many STL implementations make the assumption that the memory
allocated by one allocator can be freed by another. This effectively means that you should
only use a global or stateless memory manager with the std_allocator. Either that or you
have to verify that your version of the STL isn't going to try and allocate and deallocate
memory with different allocators.
!*/ !*/
public: public: