diff --git a/lcl/include/customnotebook.inc b/lcl/include/customnotebook.inc index ac859b1ca5..2492b0bc53 100644 --- a/lcl/include/customnotebook.inc +++ b/lcl/include/customnotebook.inc @@ -114,7 +114,7 @@ begin // delete handle APage.Parent := nil; // free the page - APage.Free; + Application.ReleaseComponent(APage); end; {$IFDEF NOTEBOOK_DEBUG} DebugLn(['TNBPages.Delete END ',fNoteBook.Name,' Index=',Index,' fPageList.Count=',fPageList.Count,' fNoteBook.PageIndex=',fNoteBook.PageIndex]);