Update versions, cleanup Jobs csproj, remove Wrapper<T>

Updated AssemblyVersion in Jobs and LowLevel projects. Cleaned up Jobs csproj by removing unused properties, project reference, and content file inclusion. Deleted the Wrapper<T> disposable struct wrapper from Ptr.cs.
This commit is contained in:
2026-04-27 13:09:24 +09:00
parent 8ce7fddd32
commit 1074f9836e
3 changed files with 2 additions and 61 deletions

View File

@@ -256,51 +256,4 @@ public ref struct Ref<T> : IEquatable<Ref<T>>
{
return !(left == right);
}
}
/// <summary>
/// Provides a wrapper for a value type that implements <see cref="IDisposable"/>, ensuring proper disposal of the contained value.
/// </summary>
/// <remarks>The <see cref="Wrapper{T}"/> class manages the lifetime of the contained value by calling its
/// <see cref="IDisposable.Dispose"/> method when the wrapper is disposed or finalized. After disposal, accessing the value
/// will throw an <see cref="ObjectDisposedException"/>.</remarks>
/// <typeparam name="T">The value type to wrap. Must be a struct that implements <see cref="IDisposable"/>.</typeparam>
public class Wrapper<T> : IDisposable
where T : struct, IDisposable
{
private T _value;
private bool _disposed;
public ref T Value => ref Get();
public Wrapper(T value)
{
_value = value;
}
~Wrapper()
{
Dispose();
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public ref T Get()
{
ObjectDisposedException.ThrowIf(_disposed, this);
return ref _value;
}
public void Dispose()
{
if (_disposed)
{
return;
}
_value.Dispose();
_disposed = true;
GC.SuppressFinalize(this);
}
}