Added Memory Tracking Code
This commit is contained in:
@@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
|
||||
/// </summary>
|
||||
[Serializable()]
|
||||
[TypeConverter(typeof(ItemTransitions_ToIDConverter))]
|
||||
public partial class ItemTransitions_ToID : BusinessListBase<ItemTransitions_ToID, ItemTransition_ToID>, ICustomTypeDescriptor, IVEHasBrokenRules
|
||||
public partial class ItemTransitions_ToID : BusinessListBase<ItemTransitions_ToID, ItemTransition_ToID>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
|
||||
{
|
||||
#region Log4Net
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
@@ -170,6 +170,29 @@ namespace VEPROMS.CSLA.Library
|
||||
MarkAsChild();
|
||||
Fetch(dr);
|
||||
}
|
||||
private bool _Disposed = false;
|
||||
private static int _CountCreated = 0;
|
||||
private static int _CountDisposed = 0;
|
||||
private static int _CountFinalized = 0;
|
||||
private static int IncrementCountCreated
|
||||
{ get { return ++_CountCreated; } }
|
||||
private int _CountWhenCreated = IncrementCountCreated;
|
||||
public static int CountCreated
|
||||
{ get { return _CountCreated; } }
|
||||
public static int CountNotDisposed
|
||||
{ get { return _CountCreated - _CountDisposed; } }
|
||||
public static int CountNotFinalized
|
||||
{ get { return _CountCreated - _CountFinalized; } }
|
||||
~ItemTransitions_ToID()
|
||||
{
|
||||
_CountFinalized++;
|
||||
}
|
||||
public void Dispose()
|
||||
{
|
||||
if (_Disposed) return;
|
||||
_CountDisposed++;
|
||||
_Disposed = true;
|
||||
}
|
||||
#endregion
|
||||
#region Data Access Portal
|
||||
// called to load data from the database
|
||||
|
Reference in New Issue
Block a user