Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An unexpected memory leak has occurred #3

Open
GoogleCodeExporter opened this issue Jan 4, 2016 · 0 comments
Open

An unexpected memory leak has occurred #3

GoogleCodeExporter opened this issue Jan 4, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

if you open a file several times, without destroying the component, for example 
here:
var
  MP3In: TMP3In;
  TotalSamples1, TotalSamples2: Cardinal;
begin
  MP3In := TMP3In.Create(nil);

  MP3In.FileName := FileName1;
  TotalSamples1 := MP3In.TotalSamples;

  MP3In.FileName := FileName2;
  TotalSamples2 := MP3In.TotalSamples;

  MP3In.Free;
end;

---------------------------
Unexpected Memory Leak
---------------------------
An unexpected memory leak has occurred. The unexpected small block leaks are:

21 - 28 bytes: TAudioStream x 1

---------------------------
ОК   
---------------------------


problem in unit libwma1.pas

   procedure lwma_reader_free(var sync_reader : wma_sync_reader);
   begin
     sync_reader.reader.Close;
      if sync_reader.buffer <> nil then
        sync_reader.buffer := nil;
     sync_reader.reader := nil;
     sync_reader.HeaderInfo := nil;
     sync_reader.AudioStream := nil;   <=======
     sync_reader.AudioStream.Free;     <======= 
     sync_reader.AudioStream := nil;   <=======
   end;

Original issue reported on code.google.com by [email protected] on 16 Dec 2014 at 9:37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant