diff --git a/BeefLibs/corlib/src/Reflection/AttributeInfo.bf b/BeefLibs/corlib/src/Reflection/AttributeInfo.bf index 1e515ae9..0489904a 100644 --- a/BeefLibs/corlib/src/Reflection/AttributeInfo.bf +++ b/BeefLibs/corlib/src/Reflection/AttributeInfo.bf @@ -105,7 +105,8 @@ namespace System.Reflection argIdx++; } - methodInfo.Invoke(targetAttr, params args); + if (methodInfo.Invoke(targetAttr, params args) case .Ok(var val)) + val.Dispose(); return .Ok; }