Wintermute Engine Forum

Wintermute Engine => Technical forum => WME sources discussion => Topic started by: jjsteele on November 23, 2009, 06:29:22 PM

Title: Strange behaviour in AdPath.cpp
Post by: jjsteele on November 23, 2009, 06:29:22 PM
In the function CAdPath::Reset() why are you looping round calling delete [] on the m_Points array? AFAIK the RemoveAll will delete everything and clean up the memory.
Title: Re: Strange behaviour in AdPath.cpp
Post by: Mnemonic on November 23, 2009, 07:08:02 PM
No, RemoveAll only cleans the collection, it will not delete the contained objects. However, it should be delete, not delete[], it's a bug. Well spotted.