Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6516


Ignore:
Timestamp:
07/05/11 15:12:08 (13 years ago)
Author:
mkommend
Message:

#1545: Removed finalizer and locked cloning.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core/3.3/ThreadSafeLog.cs

    r6424 r6516  
    6666      RegisterLogEvents();
    6767    }
    68     ~ThreadSafeLog() {
    69       locker.Dispose();
    70     }
    7168
    7269    protected ThreadSafeLog(ThreadSafeLog original, Cloner cloner)
    7370      : base(original, cloner) {
    74       log = cloner.Clone(original.log);
     71      original.locker.EnterReadLock();
     72      try {
     73        log = cloner.Clone(original.log);
     74      }
     75      finally { locker.ExitReadLock(); }
    7576    }
    7677    public override IDeepCloneable Clone(Cloner cloner) {
     
    134135    }
    135136    #endregion
     137
     138
    136139  }
    137140}
Note: See TracChangeset for help on using the changeset viewer.