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:
@@ -316,6 +316,10 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public partial class FormatInfo : IFormatOrFormatInfo
|
||||
{
|
||||
public virtual Format GetJustFormat()
|
||||
{
|
||||
return _Editable = Format.GetJustFormat(_FormatID);
|
||||
}
|
||||
public static bool HasLatestChanges()
|
||||
{
|
||||
if (!HasSeqTabFmtTabToken()) return false;
|
||||
|
@@ -423,9 +423,9 @@ namespace VEPROMS.CSLA.Library
|
||||
using(TransitionInfoList trans = TransitionInfoList.GetAffected(this.ItemID))
|
||||
{
|
||||
#region B2012-071 fix JCB
|
||||
Content oldContent = null;
|
||||
foreach (TransitionInfo tran in trans)
|
||||
{
|
||||
Content oldContent = null;
|
||||
using (Content content = tran.MyContent.Get())
|
||||
{
|
||||
if (oldContent != null && content.ContentID != oldContent.ContentID)
|
||||
@@ -449,21 +449,22 @@ namespace VEPROMS.CSLA.Library
|
||||
// content.DTS = DateTime.Now;
|
||||
// content.Save();
|
||||
//}
|
||||
if (oldContent != null)
|
||||
{
|
||||
if (oldContent.IsDirty)
|
||||
{
|
||||
oldContent.DTS = DateTime.Now;
|
||||
#region B2012-079 fix JCB
|
||||
oldContent.UserID = Volian.Base.Library.VlnSettings.UserID + " - Renumber";
|
||||
#endregion B2012-079 fix JCB
|
||||
oldContent.Save();
|
||||
}
|
||||
else // Update ContentInfo objects to reflect the change in the transition
|
||||
ContentInfo.Refresh(oldContent);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (oldContent != null)
|
||||
{
|
||||
if (oldContent.IsDirty)
|
||||
{
|
||||
oldContent.DTS = DateTime.Now;
|
||||
#region B2012-079 fix JCB
|
||||
oldContent.UserID = Volian.Base.Library.VlnSettings.UserID + " - Renumber";
|
||||
#endregion B2012-079 fix JCB
|
||||
oldContent.Save();
|
||||
}
|
||||
else // Update ContentInfo objects to reflect the change in the transition
|
||||
ContentInfo.Refresh(oldContent);
|
||||
}
|
||||
|
||||
#endregion B2012-071 fix JCB
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user