Example #1
0
 public void Dispose()
 {
     _StaticMap.Remove(_id);
     var flSliceResult = new FLSliceResult
     {
         buf = C4Params.optionsDictFleece.buf,
         size = C4Params.optionsDictFleece.size
     };
     flSliceResult.Dispose();
 }
Example #2
0
 private static void SocketWrittenTo(C4Socket *socket, FLSliceResult allocatedData)
 {
     try {
         _externalWrite?.Invoke(socket, ((FLSlice)allocatedData).ToArrayFast());
     } catch (Exception e) {
         _error?.Invoke(socket, new Exception("Error writing to socket", e));
         Native.c4socket_closed(socket, new C4Error(C4ErrorCode.UnexpectedError));
     } finally {
         allocatedData.Dispose();
     }
 }