Skip to content

Commit d384418

Browse files
committed
Removed IDisposable
`Topic` isn't disposable, nor has it ever been. `IDisposable` was implemented early on as a shortcut to allow `using`. That's an anti-pattern when applied outside of disposable resources.
1 parent 7f1abac commit d384418

1 file changed

Lines changed: 1 addition & 26 deletions

File tree

Ignia.Topics/Topic.cs

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace Ignia.Topics {
2222
/// The Topic object is a simple container for a particular node in the topic hierarchy. It contains the metadata associated
2323
/// with the particular node, a list of children, etc.
2424
/// </summary>
25-
public class Topic : IDisposable {
25+
public class Topic {
2626

2727
/*==========================================================================================================================
2828
| PRIVATE VARIABLES
@@ -599,31 +599,6 @@ protected void SetAttributeValue(string key, string value, bool? isDirty = null)
599599

600600
#endregion
601601

602-
#region Interface Implementations
603-
604-
/*==========================================================================================================================
605-
| METHOD: DISPOSE
606-
\-------------------------------------------------------------------------------------------------------------------------*/
607-
/// <summary>
608-
/// Technically, there's nothing to be done when disposing a Topic. However, this allows the topic attributes (and
609-
/// properties) to be set using a using statement, which is syntactically convenient.
610-
/// </summary>
611-
[Obsolete("There is no need to dispose of the Topic class, and reliance on this should be removed.", false)]
612-
public void Dispose() {
613-
Dispose(true);
614-
GC.SuppressFinalize(this);
615-
}
616-
617-
/// <summary>
618-
/// Protected implementation of <see cref="Dispose(Boolean)"/> for derived types.
619-
/// </summary>
620-
[Obsolete("There is no need to dispose of the Topic class, and reliance on this should be removed.", false)]
621-
protected virtual void Dispose(bool disposing) {
622-
return;
623-
}
624-
625-
#endregion
626-
627602
} // Class
628603

629604
} // Namespace

0 commit comments

Comments
 (0)