[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[ecf-dev] AbstractShare and IChannel clean-up...
|
- From: Remy Chi Jian Suen <remy.suen@xxxxxxxxx>
- Date: Wed, 22 Apr 2009 13:38:00 -0400
- Delivered-to: ecf-dev@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=TUT7eQ+zzKTuwjzkskWvm0WLiMvxi9r1dvOA76g31HQ=; b=xOGsZs96hGl5O+1zkOP9SiMpMvC+SUVn0mYeutg/BWRssPzTximbELPhIYYZq8D3eT 0vtF6XGRdrjowEvfjAlK84bl2WEha7w222B8mgzLsDpC0uhRIy5FUCTjVzUMsqA+xLJn x7MV47tkDQ5S9McekBbXVP93EPW7q4UENBpTg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=jL2JxrxhPrmEXTfJX0Dk24Bb6yQvtr3aCWkbNCPrLrLLAhXjlveG4iBcM7HW1M4Xun 5T4ndDMNLPVLfYpt4kUWbrerbguhY0sECeuqaHLzpIwi0eOVwhmprxye3wX94Vv81dL9 hJNhLH0WJ4ZVOnV+MgQENQjjVVyVCwG+QpK7Y=
Hi all,
AbstractShare's dispose() implement currently asks the channel
container adapter to remove the channel.
public synchronized void dispose() {
if (channel != null) {
adapter.removeChannel(channel.getID());
channel = null;
adapter = null;
}
}
However, the channel is not actually disposed. I noticed this when I
realized that one of my threads was still running despite the fact
that I had disconnected. I cleaned up my other IChannel
implementations but since this one had been removed from my channel
container, I had no references to it and it never got disposed. Is the
channel container supposed to dispose of the channel when a remove has
been requested or is this a bug on the AbstractShare side?
I also noticed that AbstractShare's constructor creates a channel if
one isn't immediately available. However, when it is disposed, it asks
the channel container to remove the channel. This seems a little weird
because if it was previously available, then it retrieves this
presumably shared channel, but when the share is disposed, it asks the
channel container to remove that channel which seems like it will
prevent future clients from sharing that same channel). What is the
life cycle of shares and how is it supposed to interact with its
underlying channel?
Regards,
Remy