Reduced memory usage
Add Memory Usage summary to the log file. GetJustFormat to reduce memory use Fix code so that children are not disposed while they are being used Added new method GetJustFormat to reduce memory use Fix logic so that content is not used after it is disposed Verify that Content object is not disposed before using Text Dispose of parts when Content object is disposed Verify that ContentInfo object is not disposed before using Text Dispose of parts when ContentInfo object is disposed Place brackets around DB names to support names containing periods. Dispose of parts when Item object is disposed Removed inapproriate Dispose in MakeItem Dispose of parts when ItemInfo object is disposed Remove event handler when ItemInfoList object is disposed Dispose of parts when Transtion object is disposed Dispose of parts when ZTransition object is disposed
This commit is contained in:
@@ -209,12 +209,14 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
if (Disposed) throw new Exception("Attempt to access Disposed Object");
|
||||
CanReadProperty("Text", true);
|
||||
return _Text;
|
||||
}
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
set
|
||||
{
|
||||
if (Disposed) throw new Exception("Attempt to access Disposed Object");
|
||||
CanWriteProperty("Text", true);
|
||||
if (value == null) value = string.Empty;
|
||||
if (_Text != value)
|
||||
@@ -883,13 +885,49 @@ namespace VEPROMS.CSLA.Library
|
||||
if (_Disposed) return;
|
||||
_CountDisposed++;
|
||||
_Disposed = true;
|
||||
RemoveFromDictionaries();
|
||||
if (_MyZContent != null) // 9.79
|
||||
{
|
||||
_MyZContent.Dispose();
|
||||
_MyZContent = null;
|
||||
}
|
||||
if (_ContentParts != null) // 8.93
|
||||
{
|
||||
foreach (ContentPart cp in _ContentParts)
|
||||
cp.Dispose();
|
||||
_ContentParts = null;
|
||||
}
|
||||
if (_MyEntry != null) // .465
|
||||
{
|
||||
_MyEntry.Dispose();
|
||||
_MyEntry = null;
|
||||
}
|
||||
if (_MyGrid != null)
|
||||
{
|
||||
_MyGrid.Dispose();
|
||||
_MyGrid = null;
|
||||
}
|
||||
Disposed = true;
|
||||
RemoveFromDictionaries();
|
||||
_Text = null;
|
||||
//if (_ContentDetails != null)
|
||||
// _ContentDetails = null;
|
||||
//if (_ContentItems != null)
|
||||
//{
|
||||
// _ContentItems = null;
|
||||
// //foreach (ContentItem ci in _ContentItems)
|
||||
// // ci.Dispose();
|
||||
//}
|
||||
//if (_ContentRoUsages != null)
|
||||
//{
|
||||
// //foreach (ContentRoUsage cr in _ContentRoUsages)
|
||||
// // cr.Dispose();
|
||||
// _ContentRoUsages = null;
|
||||
//}
|
||||
//if (_ContentTransitions != null)
|
||||
//{
|
||||
// foreach (ContentTransition ct in _ContentTransitions)
|
||||
// ct.Dispose();
|
||||
// _ContentTransitions = null;
|
||||
//}
|
||||
}
|
||||
private void RemoveFromDictionaries()
|
||||
{
|
||||
|
Reference in New Issue
Block a user