Changeset 266 for Include/system


Ignore:
Timestamp:
Jun 2, 2007, 11:51:16 AM (17 years ago)
Author:
dai
Message:

※本コミットがCP4バージョンのベースになります
_System_StartupProgramの呼び出しタイミングを変更。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/system/gc.sbp

    r259 r266  
    2626
    2727Class _System_CGarbageCollection
     28
    2829    ppPtr As *VoidPtr
    2930    pSize As *SIZE_T
     
    6869
    6970Public
     71
     72    Static Sub Initialize()
     73        Dim temporary[255] As Char
     74        If GetEnvironmentVariable( "ActiveBasicGarbageCollection", temporary, 255 ) Then
     75            ' 既にGCがプロセスに存在するとき
     76            sscanf( temporary, "%08x", VarPtr( _System_pGC ) )
     77            MessageBox(0,temporary,"GetEnvironmentVariable",0)
     78        Else
     79            _System_pGC = _System_calloc( SizeOf( _System_CGarbageCollection ) )
     80            _System_pGC->Begin()
     81
     82            ' GCをプロセスに登録する
     83            sprintf( temporary, "%08x", _System_pGC )
     84            SetEnvironmentVariable( "ActiveBasicGarbageCollection", temporary )
     85        End If
     86    End Sub
    7087
    7188    Sub Begin()
Note: See TracChangeset for help on using the changeset viewer.