Openoffice ole object Free

Java, C++, C#, Delphi... - Using the UNO bridges
Post Reply
Rosinha
Posts: 6
Joined: Mon Jul 07, 2014 1:27 pm

Openoffice ole object Free

Post by Rosinha »

Hello,
I have created an openoffice ole object from my application using Delphi.
That is shown below:-

OpenOffice : Variant;

OpenOffice := CreateOleObject('com.sun.star.ServiceManager');

It is getting created successfully.But when i try to free it,it still remains in task manager.
I tried the following commands to free openoffice but with no success:

varclear(openoffice);
FreeAndNil(openoffice);
openoffice := Unassigned;

Is there any other solution for this?

Thank you in advance.
OpenOffice 4.0.1 on Windows XP
User avatar
Charlie Young
Volunteer
Posts: 1559
Joined: Fri May 14, 2010 1:07 am

Re: Openoffice ole object Free

Post by Charlie Young »

I'm not sure how this stuff works in Delphi, but you might try something like OpenOffice.dispose, or however one executes a method. I also assume the variable names are case sensitive, and your example is inconsistent in that regard.
Apache OpenOffice 4.1.1
Windows XP
B Marcelly
Volunteer
Posts: 1160
Joined: Mon Oct 08, 2007 1:26 am
Location: France, Paris area

Re: Openoffice ole object Free

Post by B Marcelly »

Hi,
Get from my personal web site : Delphi 7 OOo tool
The zip file contains units with helper routines, examples, and a HowTo document. Read it.

You should have posted your question in section : Macros and UNO API > External Programs
Bernard

OpenOffice.org 1.1.5 / Apache OpenOffice 4.1.1 / LibreOffice 5.0.5
MS-Windows 7 Home SP1
User avatar
floris v
Volunteer
Posts: 4635
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Openoffice ole object Free

Post by floris v »

Maybe the code that deallocates the memory used by the OO process doesn't also inform Windows that OO has been closed?
See for instance http://docs.embarcadero.com/products/ra ... bject.html , specifically

Code: Select all

  { Closes Microsoft Word. }
  WordApp.Quit;
LibreOffice 25.8.4.2 on Ubuntu Linux
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
Post Reply