On Thu, 2008-09-25 at 23:41 +0200, Mathias Bauer wrote:
> Caolán McNamara wrote:
> 
> > On Thu, 2008-09-25 at 15:11 +0200, Mathias Bauer wrote:
> >> But the "Exit" method now is never called and IMHO it isn't necessary to
> >> do so. The only known problem this creates is that it prevents the
> >> detection of memory leaks caused by the objects that now never get
> >> deleted. 
> > 
> > Possibly still the theoretical option of hooking them back into the
> > library unloading scheme of
> > http://udk.openoffice.org/common/man/spec/library_unloading.html
> 
> IIRC this was not meant to be applied to libraries that inject pointers
> to objects implemented inside them into other libraries' code, they
> where meant to be used for libraries where the life cycle of each object
> can be tracked by UNO reference counting.

Well, I only poked around starmath (as I reckoned it would be the
simplest user) where the only usage is inside SmDocument_createInstance
which is the uno entry point. So that would make it a very good
candidate, in that the only way to get trigger the Init is when
creating a uno referenced object, so if all the starmath components 
ref/def-ed the module-used count and if something existed to call the 
library unloading-foo then it might in theory work out.

> > Not that we actually attempt to unload any unloadable modules at the
> > moment anyway as far as I can see. There's always the carrot of e.g.
> > loading a writer doc with an embedded starmath equation and after
> > closing it having starmath's globals go away. But no big sweat, I was
> > just wondering if they were supposed to connect to anything right now.
> 
> As we never know if we perhaps will need these methods at some time we
> should keep them. 

In this case I'm not wearing my "die all unused code" hat :-), I was
just genuinely interested if there was an existing code-line I couldn't
find that called them, especially because I had a hazy memory of an
offapp library that might have used them. 

So, I'd like to keep them too and just, at least in a perfect world
theory, see where they should be connected to. That said, in general I'm
really sceptical about "some day we will use them" comments about chunks
of code that have no current consumers.

C.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to