Resources used after destroy

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #37843
    HeDiBo
    Participant

    This is in sComboBoxes.pas:

    Code:
    destructor TsCustomComboBoxEx.Destroy;
    begin
    if lBoxHandle <> 0 then begin
    SetWindowLong(lBoxHandle, GWL_STYLE, GetWindowLong(lBoxHandle, GWL_STYLE) and not WS_THICKFRAME or WS_BORDER);
    UninitializeACScroll(lBoxHandle, True, False, ListSW);
    lBoxHandle := 0;
    end;
    if HandleAllocated then // Avoiding of error in standard destructor under DX10 (linked with changed Style in CreateWnd)
    DestroyWindowHandle;

    inherited; // <<<---- Cannot use resources after this.
    FreeAndNil(FBoundLabel);
    FreeAndNil(FCommonData);
    end;

    And this is in sTreeView.pas

    Code:
    destructor TsTreeView.Destroy;
    begin
    FreeAndNil(ListSW);
    inherited Destroy; // <<<---- Cannot use resources after this.
    FreeAndNil(FBoundLabel);
    FreeAndNil(FCommonData);
    end;
    #57950
    Support
    Keymaster

    Thank you, I will check and fix it in the nearest release.

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