IDE: freeing codetools buffers on closing file, bug #12183

git-svn-id: trunk@16701 -
This commit is contained in:
mattias 2008-09-24 11:41:53 +00:00
parent b71bd84f2e
commit 890fb71335
2 changed files with 5 additions and 1 deletions

View File

@ -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)

View File

@ -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,[]);