Пример #1
0
        public Subscriber(IStream stream)
        {
            _callbacks          = new SubscriberNative.otc_subscriber_cb();
            _callbacks.userData = (IntPtr)GCHandle.Alloc(this);

            _subscriber = SubscriberNative.otc_subscriber_new(stream.GetNativeReference(), ref _callbacks);
        }
Пример #2
0
 public void Dispose()
 {
     ((GCHandle)_callbacks.userData).Free();
     SubscriberNative.otc_subscriber_delete(_subscriber);
 }