delete TopComponent

View: New views
2 Messages — Rating Filter:   Alert me  

delete TopComponent

by I]ark :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm trying to implement a "close session" action in my application.
I
need to delete an instance of my current TopComponent and then create a
new one.

The problem is that the new instance of TC doesn't override
the old one.

How could I do that?


Re: delete TopComponent

by Marek Slama :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

another_half_life@... wrote:

> I'm trying to implement a "close session" action in my application.
> I
> need to delete an instance of my current TopComponent and then create a
> new one.
>
> The problem is that the new instance of TC doesn't override
> the old one.
>
> How could I do that?
>
>  
I do not understand what do you mean by 'override'. If TC is not singleton
and you free all references to old TC instance it will be gc'ed.

Winsys keeps weak references to closed TC. So after TC is closed you can
still get TC instance from winsys but it is not guaranteed.

Please explain in more details what is your problem/desired behavior.

Marek