From 890fb71335dfccd00435d6b723c753b15dd7baf8 Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 24 Sep 2008 11:41:53 +0000 Subject: [PATCH] IDE: freeing codetools buffers on closing file, bug #12183 git-svn-id: trunk@16701 - --- components/codetools/codecache.pas | 2 +- ide/main.pp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/components/codetools/codecache.pas b/components/codetools/codecache.pas index 7a19caa0c3..0e0f75da62 100644 --- a/components/codetools/codecache.pas +++ b/components/codetools/codecache.pas @@ -969,7 +969,7 @@ begin end; function TCodeBuffer.FileOnDiskNeedsUpdate: boolean; -// file on disk needs update, if file is modified or does not exist +// file on disk needs update, if memory is modified or file does not exist begin if LoadDateValid then Result:=Modified or (FFileChangeStep<>ChangeStep) diff --git a/ide/main.pp b/ide/main.pp index 25589e2a1f..d5a3db174d 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -7289,6 +7289,10 @@ begin Result:=mrOk; end; + // free sources + if (ActiveUnitInfo.Source<>nil) then + ActiveUnitInfo.Source.IsDeleted:=true; + // close form soft (keep it if used by another component) CloseUnitComponent(ActiveUnitInfo,[]);