Issue 119281 - Com (ActiveX) objects created using CreateObject from OOBasic are not removed from memory
Summary: Com (ActiveX) objects created using CreateObject from OOBasic are not removed...
Status: UNCONFIRMED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows, all
: P3 Normal
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-24 19:58 UTC by nasrallah
Modified: 2013-02-24 21:07 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description nasrallah 2012-04-24 19:58:15 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.