Пример #1
0
 public void free()
 {
     foreach (var h in collation.Values)
     {
         h.free();
     }
     foreach (var h in scalar.Values)
     {
         h.free();
     }
     foreach (var h in agg.Values)
     {
         h.free();
     }
     if (update != null)
     {
         update.free();
     }
     if (rollback != null)
     {
         rollback.free();
     }
     if (commit != null)
     {
         commit.free();
     }
     if (trace != null)
     {
         trace.free();
     }
     if (progress != null)
     {
         progress.free();
     }
     if (profile != null)
     {
         profile.free();
     }
     if (authorizer != null)
     {
         authorizer.free();
     }
 }
Пример #2
0
        void ISQLite3Provider.sqlite3_trace(IntPtr db, delegate_trace func, object v)
        {
            if (_trace_hook != null)
            {
                // TODO maybe turn off the hook here, for now
                _trace_hook.free();
                _trace_hook = null;
            }

            if (func != null)
            {
                _trace_hook = new trace_hook_info(func, v);
                SQLite3RuntimeProvider.sqlite3_trace(db.ToInt64(), Marshal.GetFunctionPointerForDelegate(new callback_trace(trace_hook_bridge)).ToInt64(), _trace_hook.ptr.ToInt64());
            }
            else
            {
                SQLite3RuntimeProvider.sqlite3_trace(db.ToInt64(), IntPtr.Zero.ToInt64(), IntPtr.Zero.ToInt64());
            }
        }