diff --git a/src/Annotations.cs b/src/Annotations.cs
index 0af1744..ddb5754 100644
--- a/src/Annotations.cs
+++ b/src/Annotations.cs
@@ -647,16 +647,20 @@ public MustUseReturnValueAttribute([NotNull] string justification)
}
///
- /// Indicates that the resulting resource of the constructor or method invocation must be disposed after use.
+ /// Indicates that the resource disposal must be handled by the use site,
+ /// meaning that the resource ownership is transferred to the callee.
+ /// This annotation can be used to annotate disposable types or their constructors individually to enable
+ /// the resource disposal IDE code analysis in every context where the new instance of this type is created.
+ /// Factory methods and 'out' parameters can also be annotated to indicate that the return value of disposable type
+ /// needs handling.
///
///
- /// Annotating input parameters with this attribute is meaningless.
- /// Constructors inherit this attribute from their class, if it is decorated.
- /// Because of attribute inheritance, you should explicitly decorate constructors which are
- /// calling base constructor that is already decorated with this attribute.
- /// Disposing is expected to be performed via either using (resource) statement, using var declaration,
- /// or call to a method with kind of decoration,
- /// usually IDisposable.Dispose() implementation.
+ /// Annotation of input parameters with this attribute is meaningless.
+ /// Constructors inherit this attribute from their type, if it is annotated,
+ /// but not from the base constructors they delegate to (if any).
+ /// Resource disposal is expected to be expressed via either using (resource) statement,
+ /// using var declaration, explicit 'Dispose' method call, or an argument passing
+ /// to a parameter with the attribute applied.
///
[AttributeUsage(
AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Parameter)]
@@ -668,14 +672,13 @@ public MustDisposeResourceAttribute()
Value = true;
}
- ///
public MustDisposeResourceAttribute(bool value)
{
Value = value;
}
///
- /// When set to false, disposing of the resource is not obligatory and will be performed during garbage collection.
+ /// When set to false, disposing of the resource is not obligatory.
/// The main use-case for explicit [MustDisposeResource(false)] annotation is to loosen inherited annotation.
///
public bool Value { get; }
@@ -685,10 +688,11 @@ public MustDisposeResourceAttribute(bool value)
/// Indicates that method or class instance acquires resource ownership and will dispose it after use.
///
///
- /// Decorating an out parameter with this attribute is meaningless.
- /// When a method itself is decorated with this attribute, its call disposes instance resource.
- /// When a field or a property is decorated with this attribute, it shows that this class owns the resource in it
- /// and will dispose it properly (e.g. in own Dispose method).
+ /// Annotation of 'out' parameter with this attribute is meaningless.
+ /// When a instance method is annotated with this attribute,
+ /// it means that it is handling the resource disposal of the corresponding resource instance.
+ /// When a field or a property is annotated with this attribute, it means that this type owns the resource
+ /// and will handle the resource disposal properly (e.g. in own IDisposable implementation).
///
[AttributeUsage(
AttributeTargets.Method | AttributeTargets.Parameter | AttributeTargets.Field | AttributeTargets.Property)]
diff --git a/src/JetBrains.Annotations.csproj b/src/JetBrains.Annotations.csproj
index 8cd0b26..824fb49 100644
--- a/src/JetBrains.Annotations.csproj
+++ b/src/JetBrains.Annotations.csproj
@@ -5,8 +5,8 @@
Use 'eap' for EAP builds of annotations
MAJOR and MINOR version numbers should match latest ReSharper version (to avoid confusion),
PATCH version may vary during development and EAPs -->
- 2023.2.0
-
+ 2023.3.0
+ eap1
$(VersionPrefix)-$(VersionSuffix)
diff --git a/src/JetBrains.Annotations.nuspec b/src/JetBrains.Annotations.nuspec
index 19dbfdd..8edda4c 100644
--- a/src/JetBrains.Annotations.nuspec
+++ b/src/JetBrains.Annotations.nuspec
@@ -18,8 +18,7 @@ JetBrains.Annotations help reduce false positive warnings, explicitly declare pu
All usages of JetBrains.Annotations attributes are erased from metadata by default, which means no actual binary reference to 'JetBrains.Annotations.dll' assembly is produced. If you need to preserve these attributes in metadata, just define 'JETBRAINS_ANNOTATIONS' conditional compilation symbol in your projects.
-• Added AspMvcViewComponentViewLocationFormatAttribute and AspMvcAreaViewComponentViewLocationFormatAttribute for ASP.NET Core ViewComponent views support
-• Added TestSubjectAttribute and MeansTestSubjectAttribute for Unit Testing IDE features
+• Added MustDisposeResourceAttribute and HandlesResourceDisposalAttribute attributes for resource disposal analysis.
jetbrains resharper rider annotations canbenull notnull