コード例 #1
0
ファイル: Program.cs プロジェクト: vijen12000/pro-.net-memory
        public static void Register(Func <object, bool> callback, object targetObj)
        {
            // Create a unreachable object that remembers the callback function and target object.
            Gen2GcCallback gcCallback = new Gen2GcCallback();

            gcCallback.Setup(callback, targetObj);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: vijen12000/pro-.net-memory
 public PinnableObjectPool(Func <T> factory)
 {
     this.factory = factory;
     Gen2GcCallback.Register(Gen2GcCallbackFunc, this);
 }