Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Strange behaviour in AdPath.cpp  (Read 3042 times)

0 Members and 1 Guest are viewing this topic.

jjsteele

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 8
    • View Profile
Strange behaviour in AdPath.cpp
« 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.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 40
  • Offline Offline
  • Gender: Male
  • Posts: 5669
    • View Profile
    • Dead:Code Site
Re: Strange behaviour in AdPath.cpp
« Reply #1 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.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.198 seconds with 18 queries.