1
0
mirror of https://bitbucket.org/cjdskunkworks/lynxastrodewcontroller.git synced 2026-05-03 17:28:52 +00:00
Files

24 lines
641 B
C#

using System.Runtime.InteropServices;
namespace ASCOM.LynxAstro.DewController
{
[ComVisible(false)]
public class ReferenceCountedObjectBase
{
public ReferenceCountedObjectBase()
{
// We increment the global count of objects.
Server.CountObject();
}
~ReferenceCountedObjectBase()
{
// We decrement the global count of objects.
Server.UncountObject();
// We then immediately test to see if we the conditions
// are right to attempt to terminate this server application.
Server.ExitIf();
}
}
}