1

Closed

Cannot dispose and instantiate new GPSHandler.

description

There is an issue In release 0.5a. If you create new instance of handler, dispose it, create another instance and try to open port you will get null reference exception. I guess that also you will not be able to use multiple instances of the GPSHandler class. This is because static serial port field.
In general, I think this code gives good examples and understanding of GPS protocol. But it is very unstable.
public class GPSHandler : IDisposable
{
    internal static SerialPort GpsPort = new SerialPort();
..........
    public void Dispose() 
    {
        if (!disposed)
        {
...
            GpsPort = null;
...
        }
        GC.SuppressFinalize(this);
    }
...
Closed Aug 27, 2008 at 7:24 AM by SharpGIS

comments

wrote Aug 27, 2008 at 7:24 AM

Resolved with changeset 22351.

wrote Feb 14, 2013 at 3:04 AM

wrote May 16, 2013 at 8:23 AM