chenqinghong
2024-05-07 3ec06a830367465068963156dcc1d8e522571c13
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Quintiq file version 2.0
#parent: #root
Method NeedsCleanup () as Boolean
{
  Description:
  [*
    Determine whether the scope needs to be cleaned up or not.
    Return true if it can be cleaned up.
    
    It can typically be cleaned up if it is no longer being used. For example, if it does not have a task anymore and it is not part of the scope for a snapshot in a debug run.
  *]
  TextBody:
  [*
    value := this.NeedsCleanupExtensible() and this.Task( relsize ) = 0 and isnull( this.CreatedBy() );
    
    if( this.Run().DebugScope() )
    {
      value := value
               and this.AsInputScope( relsize ) = 0
               and this.AsOutputScope( relsize ) = 0;
    }
    return value;
  *]
  InterfaceProperties { Accessibility: 'Module' }
}