To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=65532
Issue #:|65532
Summary:|Basic Runtime function CreateObject holds object
|reference
Component:|framework
Version:|680
Platform:|All
URL:|
OS/Version:|All
Status:|NEW
Status whiteboard:|
Keywords:|
Resolution:|
Issue type:|DEFECT
Priority:|P3
Subcomponent:|code
Assigned to:|tm
Reported by:|ab
------- Additional comments from [EMAIL PROTECTED] Thu May 18 03:47:51 -0700
2006 -------
The Basic Runtime function CreateObject holds a reference to the object
created by the function at last, even after the Basic program has finished.
If this object is an internal OLE component, this component stays alive.
Workaround: Use Dim as new <type> instead of CreateObject.
Windows Examples (check with "Processes" tabpage in Windows Task Manager):
Sub Ok
Dim oOLE as new InternetExplorer.Application
wait( 3000 )
' InternetExplorer process terminates here
End Sub
Sub Bug
Dim oOLE as Object
oOLE = CreateObject( "InternetExplorer.Application" )
wait( 3000 )
oOLE = Nothing
' InternetExplorer process does not terminate here although it should
wait( 3000 )
oOLE = CreateObject( "com.sun.star.beans.PropertyValue" )
' InternetExplorer process terminates here because CreateObject holds
' the PropertyValue object now instead of the InternetExplorer object
End Sub
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]