I fixed similar problem for germany company few years ago
Mostly it was connected with cross reference of the objects
Something like this.
lobj = createobject(...)
lobj.addproperty('obj')
loobj.obj = createobject('...')
lobj.obj.addproperty('obj1')
lobj.obj.obj1=lobj
First object keeps reference on second and second keeps reference at first.
They never released these objects.
In some cases casual places in the code =sys(1104) would help
MVP-2006-2011, PHD in Math and Physics ,
host of
www.foxclub.ru,
VFP lector at Interface and Microinform companies
Head science researcher of VNIIA Rosatom.