Closed qzhangxy closed 2 years ago
An unhandled exception of type 'System.AccessViolationException' occurred in ogr_csharp.dll :
namespace OSGeo.OGR { public class DataSource : IDisposable ... public virtual void Dispose() { lock (this) { if (swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { swigCMemOwn = false; OgrPINVOKE.delete_DataSource(swigCPtr); } **swigCPtr = new HandleRef(null, IntPtr.Zero);** GC.SuppressFinalize(this); } }
public virtual void Dispose() { lock (this) { if (swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { swigCMemOwn = false; OgrPINVOKE.delete_DataSource(swigCPtr); } **swigCPtr = new HandleRef(null, IntPtr.Zero);** GC.SuppressFinalize(this); } }
solved
@qzhangxy What was the problem specifically?
An unhandled exception of type 'System.AccessViolationException' occurred in ogr_csharp.dll :
namespace OSGeo.OGR { public class DataSource : IDisposable ...
public virtual void Dispose() { lock (this) { if (swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { swigCMemOwn = false; OgrPINVOKE.delete_DataSource(swigCPtr); } **swigCPtr = new HandleRef(null, IntPtr.Zero);** GC.SuppressFinalize(this); } }