Menu

#131 Deleting a ID3_Tag object causses a crash

happens every time
open
interface (10)
5
2003-12-21
2003-04-02
Anonymous
No

Everytime I allocate a ID3_Tag object using the new operator, it crashes when I use the delete operator later on the object.

This simple test crashes everytime for me. I'm using the static lib inside a MFC project.

ID3_Tag* myTag;

myTag = new ID3_Tag();

if(myTag) delete myTag; // this crashes!

Discussion

  • isildur

    isildur - 2003-04-02

    Logged In: YES
    user_id=748234

    I have corrected the problem by adding a GetInstance() and a ReleaseID3_Tag() method to the ID3_Tag class.

    I use a static ID3_Tag object and call GatInstance() to get a pointer to a new ID3_Tag object. The ReleaseID3_Tag() method just delete itself. Like said in a previous bug report, the problem seems to be with different implementation of the new and delete operators. The objects get allocated with an implementation and is deleted with another. The aloocation and deletion should all take place inside the library I think.

     
  • isildur

    isildur - 2003-04-02

    Logged In: YES
    user_id=748234

    I have corrected the problem by adding a GetInstance() and a ReleaseID3_Tag() method to the ID3_Tag class.

    I use a static ID3_Tag object and call GatInstance() to get a pointer to a new ID3_Tag object. The ReleaseID3_Tag() method just delete itself. Like said in a previous bug report, the problem seems to be with different implementation of the new and delete operators. The objects get allocated with an implementation and is deleted with another. The aloocation and deletion should all take place inside the library I think.

     
  • T.H.F. Klok

    T.H.F. Klok - 2003-12-21
    • assigned_to: nobody --> t1mpy
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.