[prev in list] [next in list] [prev in thread] [next in thread]
List: taglib-devel
Subject: Re: TODO - The Windows Geschischte
From: Sebastian Pipping <webmaster () hartwork ! org>
Date: 2006-07-20 16:29:06
Message-ID: 44BFAF52.60500 () hartwork ! org
[Download RAW message or body]
Lukáš Lalinský wrote:
> Sebastian Pipping wrote:
>> there is another thing about this name variable:
>> FilePrivate is constructed from astring that was allocated somewhere
>> outside but frees it in the destructor using "free". This causes
>> trouble at least when the original memory was allocated using
>> "new char[..]". I remember a rule of thumb to never mix
>> new/free and malloc/delete. I think working with a copy would be
>> a good way to solve this.
>
> It already works with a copy. The string is allocated in File::File by strdup.
----------------------------------------------
Sorry, I overlooked that.
Maybe moving the strdup call form File to
FilePrivate would be a good idea so
both strdup and free are at the same place.
Sebastian
--
Sebastian Pipping
http://www.hartwork.org/
_______________________________________________
taglib-devel mailing list
taglib-devel@kde.org
https://mail.kde.org/mailman/listinfo/taglib-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic