This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: STL::list::clear , erase help
- From: Nathan Myers <ncm-nospam at cantrip dot org>
- To: "'libstdc++ at gcc dot gnu dot org'" <libstdc++ at gcc dot gnu dot org>
- Cc: vpatil at knightsindia dot co dot in
- Date: Fri, 29 Nov 2002 11:25:12 +0000
- Subject: Re: STL::list::clear , erase help
- References: <B0021A7466D3D51190610080C8034919060895@ALPS-BDC>
On Fri, Nov 29, 2002 at 04:10:40PM +0530, Vijay Patil wrote:
>
> list<CKMaskApp*> m_MaskAppList;
>
> if i say m_MaskAppList->clear(); , will it call the destructor of CKMaskApp
> objects, i saw the MSDN documents it says that N destructors are called, but
> destructors are never called, I'm working with MS VC with CL compiler on Win
> NT
We have no knowledge of MSVC documents or bugs.
In the GNU C++ library, if you call the clear() member of m_MaskAppList
(a poor choice of name, by the way -- it's usually a mistake to name a
variable after its implementation) the pointers will not be deleted.
Nathan Myers
ncm-nospam@cantrip.org