I am bit confused, because AFAIK in c# you cannot delete an object explicitly - only the garbage collector can delete objects.
And your code looks a bit odd, too. Should it not be delete [] gr? -----Original Message----- From: Luc Le Blanc [mailto:[email protected]] Sent: 17 January 2009 10:37 To: Palm Developer Forum Subject: "delete" not working in CW9.3 C++ ? I had to port a small C# app to Palm OS so I used C++ with CW 9.3. Everything works fine except deleting allocated arrays. I suspected pointer corruption, but even if I try deleting my array right after creating it, I still get an Invalid Chunk Ptr error: Vector *gr = new Vector[ num ]; // num is 56 delete gr; // fails! Ironically, if I don't delete it, I get a memory leak when exiting the app. What's wrong with delete? Luc Le Blanc -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/ -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
