Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,19 @@ public List<ProjectBlockInfo> BlockInfos
get { return readPlcBlocksList(); }
}

/// <summary>
/// Drops the converted blocks cached on this folder's block infos, so they can be garbage collected.
/// Call this when converting many blocks one after another, otherwise every converted block stays in memory.
/// </summary>
public void ClearBlockCache()
{
if (_intBlockList == null)
return;

foreach (var blkInfo in _intBlockList)
blkInfo._Block = null;
}

/// <summary>
/// Read all blocks from the S7 Project and cache them into the 'tmpBlocks' field.
/// </summary>
Expand Down
Loading