Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006214 [JEDI VCL] 00 JVCL Components major always 2013-10-14 11:38 2015-09-14 13:20
Reporter PostAp View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.47
Summary 0006214: TJvSimScope.Destroy memory leak
Description unit JvSimScope;

destructor TJvSimScope.Destroy;
begin
  FDrawBuffer.Free;
  FLines.Free;
  inherited Destroy;
end;

need be:

destructor TJvSimScope.Destroy;
begin
  FDrawTimer.Free;
  FDrawBuffer.Free;
  FLines.Free;
  inherited Destroy;
end
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0020669)
PostAp (reporter)
2013-10-14 20:48

sorry, this better

destructor TJvSimScope.Destroy;
begin
  FDrawTimer.Enabled := False;
  FDrawTimer.OnTimer := nil;
  FDrawBuffer.Free;
  FLines.Free;
  inherited Destroy;
end
(0020670)
Arioch (developer)
2013-10-15 10:22

So, you would not destroy FDrawTimer at all ?
(0020672)
PostAp (reporter)
2013-10-17 23:29

no, i was wrong in subj name

constructor TJvCustomLED.Create(AOwner: TComponent);
begin
...
  FTimer := TTimer.Create(Self);
...

but if FTimer active when component destroying it can trigg on NIL object in FTimer.OnTimer := DoBlink;
(0020676)
Arioch (developer)
2013-10-21 10:58

> TTimer.Create(Self);

That means that the component would destroy the timer before destroying itself.
And destroying the timer would do all those things like Enabled := false and OnTimer := nil internally.

So i guess it needs more investigation when and how did you got AV dereference. Perhaps it was done in a different totalyl unrelated place...

PS. OTOH you tell of FTimer in one post and of FDrawTimer in another post, so WHICH timer did you actually referred to?

- Issue History
Date Modified Username Field Change
2013-10-14 11:38 PostAp New Issue
2013-10-14 20:48 PostAp Note Added: 0020669
2013-10-15 10:22 Arioch Note Added: 0020670
2013-10-17 23:29 PostAp Note Added: 0020672
2013-10-21 10:58 Arioch Note Added: 0020676
2013-12-13 11:07 obones Status new => acknowledged
2013-12-13 15:54 obones Status acknowledged => resolved
2013-12-13 15:54 obones Fixed in Version => Daily / GIT
2013-12-13 15:54 obones Resolution open => fixed
2013-12-13 15:54 obones Assigned To => obones
2015-09-14 13:20 obones Fixed in Version Daily / GIT => 3.48


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker