View Issue Details

IDProjectCategoryView StatusLast Update
0001499JEDI VCL00 JVCL Componentspublic2004-03-19 10:53
ReporterCOREAssigned Touser72 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001499: Memory leaks in TJvGroupHeader
DescriptionWhile investigating my application with MemCheck I intercepted memory leak in TJvGroupHeader. TPen and TBrush are allocated in constructor, but they aren't destroyed. I use the JVCL 2.10 so I fixed it in this version, I include the fixes in the additional information field.
Additional InformationFix:
Add this line to the public section of TJvGroupHeaderOptions and TJvGroupHeader:

    destructor Destroy; override;


and this code:

destructor TJvGroupHeader.Destroy;
begin

  if Assigned(FBevelOptions) then
    FBevelOptions.Free;

  if Assigned(FLabelOptions) then
    FLabelOptions.Free;

  inherited;
end;

destructor TJvGroupHeaderOptions.Destroy;
begin
  if Assigned(FPen) then
    FPen.Free;

  if Assigned(FBrush) then
    FBrush.Free;

  inherited;
end;
TagsNo tags attached.

Activities

user72

2004-03-19 10:53

  ~0003395

Fixed in CVS. Thanks.

Issue History

Date Modified Username Field Change
2004-03-19 10:07 CORE New Issue
2004-03-19 10:53 user72 Status new => resolved
2004-03-19 10:53 user72 Resolution open => fixed
2004-03-19 10:53 user72 Assigned To => user72
2004-03-19 10:53 user72 Note Added: 0003395