There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Device finalized after disposal
Working with DotSpatial.Positioning and Device.cs
After disposing of a Device even though GC.SuppressFinalize(this); is called in the dispose method the object gets finalized anyways and causes a null reference exception when calling CancelDetection(); because _detectionStartedWaitHandle and _detectionCompleteWaitHandle are null from disposal.
If I comment out GC.ReRegisterForFinalize(this); on line 706 in Device.cs, the object does not get finalized after already being disposed. GC.ReRegisterForFinalize(this); is never called after the disposal only before, during detection.