Memory Leak in Taglib version 1.7.2
Kris Gustafson
kris3927gus at hotmail.com
Thu Aug 2 00:10:48 UTC 2012
To whom it may concern,
I believe I found a memory leak in FrameFactory (I am using VS C++ 2008) in
release version 1.7.2 of TabLib.
id3v2framefactory.cpp contains the following code:
////////////////////////////////////////////////////////////////////////////
////
// protected members
////////////////////////////////////////////////////////////////////////////
////
FrameFactory::FrameFactory()
{
d = new FrameFactoryPrivate;
}
FrameFactory::~FrameFactory()
{
delete d;
}
"d" receives it's pointer from "new", but the destructor is never called.
In fact, the header file has the following comment:
protected:
.
/*!
* Destroys the frame factory. In most cases this will never be
called (as
* is typical of singletons).
*/
virtual ~FrameFactory();
I have verified in the debugger this is the case, that the destructor is not
called.
So, where would be a good place to delete "d"?
Best regards,
Kris Gustafson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/taglib-devel/attachments/20120801/4750666a/attachment.html>
More information about the taglib-devel
mailing list