|
From: Per W. <pw...@ia...> - 2003-01-28 08:34:21
|
Exactly, in both cases it's the programmers responsibility to know what they are doing. But for native array you know what happens. With containers, it's so easy to assume magic somewhere inside. /Per W On Tue, 28 Jan 2003, Ioannis Vranos wrote: > -------Original Message------- > > From: Per Westermark > Date: =D4=F1=DF=F4=E7, 28 =C9=E1=ED=EF=F5=DC=F1=E9=EF=F2 2003 3:01:54 =F0= =EC > To: Ioannis Vranos > Cc: dev...@li... > Subject: Re: [Dev-C++] STL::Vector > > One point about putting a 'naked' pointer into different kind of > containers, is that the pointer doesn't have a destructor to release the > referenced memory. > > /Per W > > > =3D=3D> I agree with that, including built in arrays. So he must delete o= bjects > pointed by pointers manually. This doesn't mean anything however against > using vectors of pointers in place of built in arrays with pointers. > > > Ioannis Vranos > > * Programming pages: http://www.noicys.freeurl.com > * Alternative URL: http://run.to/noicys |