mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 21:14:23 -04:00
Merge pull request #180 from TsudaKageyu/master
Fixed possible memory leak
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
copyright : (C) 2002 - 2008 by Scott Wheeler
|
||||
copyright : (C) 2012 by Tsuda Kageyu
|
||||
email : wheeler@kde.org
|
||||
***************************************************************************/
|
||||
|
||||
@ -86,19 +86,22 @@ ByteVector RIFF::Info::StringHandler::render(const String &s) const
|
||||
static const StringHandler defaultStringHandler;
|
||||
const RIFF::Info::StringHandler *RIFF::Info::Tag::TagPrivate::stringHandler = &defaultStringHandler;
|
||||
|
||||
RIFF::Info::Tag::Tag(const ByteVector &data) : TagLib::Tag()
|
||||
RIFF::Info::Tag::Tag(const ByteVector &data)
|
||||
: TagLib::Tag()
|
||||
, d(new TagPrivate())
|
||||
{
|
||||
d = new TagPrivate;
|
||||
parse(data);
|
||||
}
|
||||
|
||||
RIFF::Info::Tag::Tag() : TagLib::Tag()
|
||||
RIFF::Info::Tag::Tag()
|
||||
: TagLib::Tag()
|
||||
, d(new TagPrivate())
|
||||
{
|
||||
d = new TagPrivate;
|
||||
}
|
||||
|
||||
RIFF::Info::Tag::~Tag()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
String RIFF::Info::Tag::title() const
|
||||
|
@ -119,6 +119,7 @@ namespace TagLib {
|
||||
virtual void setTrack(uint i);
|
||||
|
||||
virtual bool isEmpty() const;
|
||||
|
||||
/*
|
||||
* Gets the value of the field with the ID \a id.
|
||||
*/
|
||||
@ -129,7 +130,7 @@ namespace TagLib {
|
||||
* If the field does not exist, it is created.
|
||||
* If \s is empty, the field is removed.
|
||||
*
|
||||
* \note fieldId must be four-byte long pure ascii string. This function
|
||||
* \note fieldId must be four-byte long pure ASCII string. This function
|
||||
* performs nothing if fieldId is invalid.
|
||||
*/
|
||||
void setFieldText(const ByteVector &id, const String &s);
|
||||
|
Reference in New Issue
Block a user