LOCAL i, oTestobject as custom, sClassName as string LOCAL outputFile as String outputFile = "c:\ouput.txt" oTestobject = CREATEOBJECT("Custom") FOR i = 1 TO 200000 STRTOFILE(ALLTRIM(STR(i)),"outputFile",0) sClassName = SYS(2015) oTestobject.addobject(sclassName, "custom") oTestobject.RemoveObject(sclassname) ENDFORI think the problem is VFP only allow 64366 object name that is stored in an internal table. When you exceed this level you get the to many names used exception dialog. After this dialog VFP starts acting really goofy and you need to quit and restart. I think this resets the internal table.