Memory leaks with TsColorSelect and TsAlphaHints.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #36825
    JM-DG
    Participant

    With the new version 10.24 coming out, I've had multiple memory leaks.

    I use Delphi 7 on Windows 7.

    With TsColorSelect, when you .Execute() it the first time then close it, everything is fine. If you try to .Execute() it again then close it, a “Multi Free memory leak” error will occur.

    At line 74

    Code:
    FCustomColors.Free;

    I think it should instead be :

    Code:
    CustomColors.Assign(cd.CustomColors);

    There's another memory leak.

    If you have a TsColorSelect on your form and never .Execute() it, you then proceed to close your application FCustomColors will never be freed.

    We should add a destroy function.

    Code:
    destructor Destroy(); override;

    Code:
    destructor TsColorSelect.Destroy();
    begin
    FCustomColors.Free;
    inherited Destroy();
    end;

    With TsAlphaHints, I couldn't find why there's a memory leak. However, I know there's one at line 988.

    It seems like

    Code:
    Manager.ShowTimer := TsShowTimer.Create(nil);

    is somehow never freed.

    Maybe it should help pinpoint where's the problem.

    I use a button with a hint to close my application.

    So a hint is shown each time I close my application.

    No memory leak if you don't display at least a hint once.

    #54621
    carl82
    Participant

    I'm working with Delphi 7 and Fast Memory Manager 4.991 and i also have the same problem. 🙁

    #54622
    JM-DG
    Participant

    I replaced line 988 by

    Code:
    if Assigned(Manager.ShowTimer) = false then
    Manager.ShowTimer := TsShowTimer.Create(nil);

    and everything is working fine now.

    #54625
    Support
    Keymaster

    Hello!

    This issue will be solved in the nearest release (on this week).

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.