Apache OpenOffice (AOO) Bugzilla – Issue 119281
Com (ActiveX) objects created using CreateObject from OOBasic are not removed from memory
Last modified: 2013-02-24 21:07:55 UTC
When creating an instance of a com object (ActiveX object) of a dll Open Office keeps the dll locked in memory until all open openoffice instances are closed. The garbage collector of OOo Basic is not cleaning the references properly. to reproduce (sample using windows' scrrun.dll ) 1- open two open office writer documents (I'm gonna call them odt1, odt2) 2- add a macro to odt1 and add the piece of code below Sub Main dim fso fso = CreateObject("Scripting.FileSystemObject") if fso.fileexists("C:\a.odt") then msgbox ("File C:\a.od exists") else msgbox ("File C:\a.od does not exist") end if fso = nothing End Sub 3- run the Main sub 4- close odt1 5- try to rename of remove the scrrun.dll (C:\windows\system32\) , windows doesnt let you. If you use unlocker (http://www.emptyloop.com/unlocker/) it shows soffice.bin locking the file.