Skip to content

Commit

Permalink
2008-03-01 Ivan N. Zlatev <contact@i-nz.net>
Browse files Browse the repository at this point in the history
        * Component.cs: Do not set the Site to null on disposing as this
        is the Containers job. Instead try to remove from Container if sited.


svn path=/trunk/mcs/; revision=97093
  • Loading branch information
ivanz committed Mar 1, 2008
1 parent baec40e commit be577e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions mcs/class/System/System.ComponentModel/ChangeLog
@@ -1,3 +1,8 @@
2008-03-01 Ivan N. Zlatev <contact@i-nz.net>

* Component.cs: Do not set the Site to null on disposing as this
is the Containers job. Instead try to remove from Container if sited.

2008-02-26 Gert Driesen <drieseng@users.sourceforge.net>

* CharConverter.cs: Use trimmed value in FormatException.
Expand Down
3 changes: 2 additions & 1 deletion mcs/class/System/System.ComponentModel/Component.cs
Expand Up @@ -131,11 +131,12 @@ public void Dispose ()
protected virtual void Dispose (bool release_all)
{
if (release_all) {
if (mySite != null && mySite.Container != null)
mySite.Container.Remove (this);
EventHandler eh = (EventHandler) Events [disposedEvent];
if (eh != null)
eh (this, EventArgs.Empty);
}
mySite = null;
}

protected virtual object GetService (Type service)
Expand Down

0 comments on commit be577e6

Please sign in to comment.