clea LOCAL lcTestList lcTestList = "timPureAddP,timRizeAddP,timDownAddP,timPureAddO,timRizeAddO,timDownAddO, DestroyOverhead" FOR lnRun = 1 TO ALINES(laTest, lcTestList,5,",") loX = CREATEOBJECT(laTest[m.lnRun]) loX.Doit() next DEFINE CLASS destroyoverhead as container nThousands = 1 nControlCount = 1000 nObjRun = 0 nSec1 = 0 nSec2 = 0 nSec3 = 0 cObjList = "Line,TextBox,Container,Custom" cObjPrefix = "oStro" cObjType = "Empty" lStackDown = .f. oCont = .null. FUNCTION DoIt LOCAL lcObj, lnObj, lnRun FOR lnRun = 5 TO 5 STEP 40 FOR lnObj = 1 TO ALINES(laObj,this.cObjList,5, ",") = SYS(1104) this.oCont = CREATEOBJECT("Container") *this.oCont = CREATEOBJECT("Custom") this.DoOne(laObj[m.lnObj], m.lnRun) this.oCont = .null. this.nSec3 = seconds() = SYS(1104) = this.ShowTime() next next FUNCTION DoOne(tcObjType, tnThousands) this.cObjType = EVL(m.tcObjType, this.cObjType) this.nThousands = EVL(m.tnThousands, this.nThousands) this.nControlCount = this.nThousands*1000 this.nSec1 = seconds() = this.Build() this.nSec2 = seconds() *SET STEP ON IF this.lStackDown = this.TearRize() ELSE = this.TearDown() ENDIF RETURN FUNCTION ShowTime(tcWhat) LOCAL lcLog lcLog = TRANSFORM(DATETIME()); + " " + PADL(ALLTRIM(STR((this.nSec2-this.nSec1)*1000)),9,"0"); + " " + PADL(ALLTRIM(STR((this.nSec3-this.nSec2)*1000)),9,"0"); + STR(this.nControlCount, 9) ; + " " + PADR(this.Class,15) + this.cObjType ? m.lcLog FUNCTION Build() for this.nObjRun = 1 TO this.nControlCount llOk = this.Adder() ASSERT llOk next RETURN FUNCTION CurProp() return this.cObjPrefix + PADL(ALLTRIM(STR(this.nObjRun)),5,"0") FUNCTION TearRize() for this.nObjRun = 1 TO this.nControlCount = this.Remover() next RETURN FUNCTION TearDown() for this.nObjRun = this.nControlCount TO 1 STEP -1 = this.Remover() next FUNCTION Adder() RETURN !EMPTY(this.CurProp()) FUNCTION Remover() RETURN !EMPTY(this.CurProp()) ENDDEFINE DEFINE CLASS timPureAddO as destroyoverhead FUNCTION Adder() RETURN this.oCont.AddObject(this.CurProp(), this.cObjType) ENDDEFINE DEFINE CLASS timPureAddP as destroyoverhead FUNCTION Adder() RETURN this.oCont.AddProperty(this.CurProp(), CREATEOBJECT(this.cObjType)) ENDDEFINE DEFINE CLASS timRizeAddO as timPureAddO FUNCTION Remover() RETURN this.oCont.RemoveObject(this.CurProp()) ENDDEFINE DEFINE CLASS timRizeAddP as timPureAddP FUNCTION Remover() LOCAL lc2Null lc2Null = "this.oCont." + this.CurProp() STORE Null TO (m.lc2Null) ENDDEFINE DEFINE CLASS timDownAddO as timRizeAddO lStackDown = .t. ENDDEFINE DEFINE CLASS timDownAddP as timRizeAddP lStackDown = .t. ENDDEFINE>