* contrib/hbmysql/utils/dbf2mysq.prg
* formatting. for some reason hbformat misses to
uppercase one specific FOR/NEXT loop.
* contrib/hbnf/menu1.prg
* contrib/hbnf/pegs.prg
* contrib/hbnf/vertmenu.prg
* extras/gtwvw/tests/prog0.prg
* extras/gtwvw/tests/prog1.prg
* extras/gtwvw/tests/prog2.prg
* tests/db_brows.prg
* tests/onidle.prg
* tests/scroll.prg
* tests/testbrw.prg
% replaced DEVPOS()/DEVOUT() with HB_DISPOUTAT()/SETPOS()
calls
* include/harbour.hbx
* contrib/hbnf/aredit.prg
* contrib/hbnf/tbwhile.prg
* extras/gtwvw/tests/prog0
* extras/gtwvw/tests/prog1
* extras/gtwvw/tests/prog2
* extras/gtwvw/tests/wvwtest9
* tests/brwpos.prg
* tests/tb1.prg
* tests/testbrw.prg
! fixed some function names wrongly camelcased
* src/rtl/profiler.prg
* formatted
+ added parameter list to METHOD declarations
* tests/testprof.prg
* replaced with copy embedded in src/rtl/profiler.prg
* formatted
* tests/wcecon.prg
! unicode fix
78 lines
2.0 KiB
Plaintext
78 lines
2.0 KiB
Plaintext
/*
|
|
* $Id$
|
|
*/
|
|
|
|
#include "hbmemory.ch"
|
|
|
|
PROCEDURE Main()
|
|
|
|
LOCAL nH1, nH2, nH3, nH4
|
|
LOCAL n := 0
|
|
LOCAL aSign := { "|", "/", "-", "\" }
|
|
LOCAL nPrev := Seconds()
|
|
|
|
CLS
|
|
? " Time: Memory used: Miliseconds elapsed"
|
|
?
|
|
? "Can you see it ??? :) Press any key or wait 30 seconds"
|
|
?
|
|
?
|
|
@ 10, 2 SAY "Memory before TEST() call" + Str( Memory( HB_MEM_USED ) )
|
|
TEST()
|
|
@ 11, 2 SAY "Memory after TEST() and before collecting" + Str( Memory( HB_MEM_USED ) )
|
|
hb_gcAll()
|
|
@ 12, 2 SAY "Memory after collecting" + Str( Memory( HB_MEM_USED ) )
|
|
nH1 := hb_idleAdd( {|| hb_DispOutAt( 0, 1, Time() ) } )
|
|
nH2 := hb_idleAdd( {|| TEST(), hb_DispOutAt( 0, 21, Memory( HB_MEM_USED ) ) } )
|
|
nH3 := hb_idleAdd( {|| iif( n == 4, n := 1, n++ ), hb_DispOutAt( 0, 41, aSign[ n ] ) } )
|
|
nH4 := hb_idleAdd( {|| hb_DispOutAt( 0, 61, 1000 * ( Seconds() - nPrev ) ), nPrev := Seconds() } )
|
|
|
|
? ValType( nH1 ), nH1, ValType( nH2 ), nH2, ValType( nH3 ), nH3, ValType( nH4 ), nH4
|
|
|
|
Inkey( 30 )
|
|
IF ! Empty( nH3 )
|
|
@ 14, 2 SAY "Delete task 3: " + hb_ValToStr( nH3 )
|
|
hb_idleDel( nH3 )
|
|
ENDIF
|
|
IF ! Empty( nH2 )
|
|
@ 15, 2 SAY "Delete task 2: " + hb_ValToStr( nH2 )
|
|
hb_idleDel( nH2 )
|
|
ENDIF
|
|
IF ! Empty( nH1 )
|
|
@ 16, 2 SAY "Delete task 1: " + hb_ValToStr( nH1 )
|
|
hb_idleDel( nH1 )
|
|
ENDIF
|
|
IF ! Empty( nH4 )
|
|
@ 17, 2 SAY "Delete task 4: " + hb_ValToStr( nH4 )
|
|
hb_idleDel( nH4 )
|
|
ENDIF
|
|
|
|
@ 18, 2 SAY "Memory after idle states" + Str( Memory( HB_MEM_USED ) )
|
|
hb_gcAll()
|
|
@ 19, 2 SAY "Memory after collecting" + Str( Memory( HB_MEM_USED ) )
|
|
|
|
RETURN
|
|
|
|
PROCEDURE TEST()
|
|
|
|
LOCAL a, b, c
|
|
LOCAL cb
|
|
|
|
a := Array( 3 )
|
|
b := Array( 3 )
|
|
c := Array( 3 )
|
|
a[ 1 ] := a
|
|
a[ 2 ] := b
|
|
a[ 3 ] := c
|
|
b[ 1 ] := a
|
|
b[ 2 ] := b
|
|
b[ 3 ] := c
|
|
c[ 1 ] := a
|
|
c[ 2 ] := b
|
|
c[ 3 ] := c
|
|
|
|
cb := {| x | x := cb }
|
|
Eval( cb )
|
|
|
|
RETURN
|