search for: iterator_

Displaying 4 results from an estimated 4 matches for "iterator_".

Did you mean: iterator
2011 Jun 10
2
Memory leak using libflac++
Hi all, I'm the author of flactag, a utility for tagging whole-album FLAC files with embedded CUE sheets using data from the MusicBrainz servers. I've recently run it through valgrind, and I'm seeing memory leaks like the following: 12 bytes in 1 blocks are definitely lost in loss record 1 of 5 at 0x402377E: operator new(unsigned) (vg_replace_malloc.c:224) by 0x41448A8:
2011 Jun 11
0
Flac-dev Digest, Vol 79, Issue 3
...cc:66) > > > > In my code, the offending line is: > > > > m_PictureBlock=(FLAC::Metadata::Picture*)Iterator.get_block(); > > I've never used the C++ API, but the source for get_block() is just: > > return > local::construct_block(::FLAC__metadata_simple_iterator_get_block(iterator_)); > > and construct_block() looks like (simplified for the picture case): > > Prototype *ret = 0; > ret = new Picture(object, /*copy=*/false); > return ret; > > So I don't see any way this couldn't be a leak if you aren't deleting &gt...
2011 Jun 11
0
Memory leak using libflac++
....cc:134) > by 0x805D4E2: main (flactag.cc:66) > > In my code, the offending line is: > > m_PictureBlock=(FLAC::Metadata::Picture*)Iterator.get_block(); I've never used the C++ API, but the source for get_block() is just: return local::construct_block(::FLAC__metadata_simple_iterator_get_block(iterator_)); and construct_block() looks like (simplified for the picture case): Prototype *ret = 0; ret = new Picture(object, /*copy=*/false); return ret; So I don't see any way this couldn't be a leak if you aren't deleting the pointer returned from get_block()...
2013 Jul 09
0
Slight memory leak or bad documentation
...messing around with a metadata modifier in flac (using the C++ api) and found something strange. When iterating over a chain and calling FLAC::Metadata::Iterator::get_block(), it seems a newly constructed ProtoType* is returned (the source says "return local::construct(::FLAC__metadata_simple_iterator_get_block(iterator_));"), if one does not delete this pointer, the program leaks memory (see attached example, run it through valgrind). However the documentation for get_block() only refers to the C API function FLAC__metadata_iterator_get_block(), which expilicitly states: "Do not call...