mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
debug Destructor #131
This commit is contained in:
@ -7,6 +7,7 @@ using System.Collections.Concurrent;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
|
||||
namespace FreeSql
|
||||
{
|
||||
@ -36,11 +37,10 @@ namespace FreeSql
|
||||
}
|
||||
|
||||
~DbSet() => this.Dispose();
|
||||
bool _isdisposed = false;
|
||||
int _disposeCounter;
|
||||
public void Dispose()
|
||||
{
|
||||
if (_isdisposed) return;
|
||||
_isdisposed = true;
|
||||
if (Interlocked.Increment(ref _disposeCounter) != 1) return;
|
||||
try
|
||||
{
|
||||
this._dicUpdateTimes.Clear();
|
||||
|
Reference in New Issue
Block a user