View Issue Details

IDProjectCategoryView StatusLast Update
0006214JEDI VCL00 JVCL Componentspublic2015-09-14 13:20
ReporterPostApAssigned Toobones 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.47 
Target VersionFixed in Version3.48 
Summary0006214: TJvSimScope.Destroy memory leak
Descriptionunit 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
TagsNo tags attached.

Activities

PostAp

2013-10-14 20:48

reporter   ~0020669

sorry, this better

destructor TJvSimScope.Destroy;
begin
  FDrawTimer.Enabled := False;
  FDrawTimer.OnTimer := nil;
  FDrawBuffer.Free;
  FLines.Free;
  inherited Destroy;
end

Arioch

2013-10-15 10:22

developer   ~0020670

So, you would not destroy FDrawTimer at all ?

PostAp

2013-10-17 23:29

reporter   ~0020672

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;

Arioch

2013-10-21 10:58

developer   ~0020676

> 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