using System.Runtime.CompilerServices;
namespace Mono {
- internal sealed class SafeGPtrArrayHandle : IDisposable {
+ internal struct SafeGPtrArrayHandle : IDisposable {
RuntimeGPtrArrayHandle handle;
internal SafeGPtrArrayHandle (IntPtr ptr)
handle = new RuntimeGPtrArrayHandle (ptr);
}
- ~SafeGPtrArrayHandle ()
- {
- Dispose (false);
- }
-
- void Dispose (bool disposing)
- {
- RuntimeGPtrArrayHandle.DestroyAndFree (ref handle);
- }
-
public void Dispose () {
- Dispose (true);
- GC.SuppressFinalize (this);
+ RuntimeGPtrArrayHandle.DestroyAndFree (ref handle);
}
internal int Length {