public void CreateAndPopulatePools() { _scanPool = new ScanPool <X>(); _scanPool.Return(new X(false, 0, null)); _scanPool.ScanReturn(new X(false, 0, null)); _scanPool.ScanReturn(new X(false, 0, null)); _stackPool = new StackPool <X>(); _stackPool.Return(new X(false, 0, null)); _stackPool.Return(new X(false, 0, null)); }
public static X ScanRentOrNew(this ScanPool <X> p, bool b, int i, string s) => p.ScanRent()?.Init(b, i, s) ?? new X(b, i, s);
public void CreatePools() { _scanNoScanPool = new ScanPool <X>(); _scanPool = new ScanPool <X>(); _stackPool = new StackPool <X>(); }
public static X RentNoScanOrNew(this ScanPool <X> p, bool b, int i, string s) => p.RentNoScan()?.Init(b, i, s) ?? new X(b, i, s);