yeah that makes sense. My project is a slicing algorithm that needs to retain a large number of faces and wires as it slices: early versions were unacceptable but using current code i dont notice much memory run-away.
On Wed, Feb 17, 2010 at 7:30 PM, Frank Conradie <fr...@qfin.net> wrote: > Hi Dave > > I will try the explorer Clear and Destroy - I cannot really nullify the > shapes as I need them further along in the algorithm. > > Thanks, > Frank > > > On 17/02/2010 4:25 PM, Dave Cowden wrote: > > Did you try calling these methods to see if the memory releases? With a > script i have, i ran into memory growth early, but these seemed to fix it: > > > face.Nullify(); > texp.Clear(); > > > texp.Destroy(); > > > On Wed, Feb 17, 2010 at 6:33 PM, Frank Conradie <fr...@qfin.net> wrote: > >> Hi guys, >> >> After running into serious memory use issues with our geometric >> processing algorithm, I have done a simple experiment that seems to show >> that wrapper garbage collection does not work at all. Try the code >> below, and you should run out of memory in no time: >> >> >> import gc >> from OCC.gp import * >> from OCC.BRepPrimAPI import * >> from OCC.TopExp import * >> >> def TestMemory(): >> w = 0.1 >> fp1 = (0.,0.,0.) >> fp2 = (w,w,w) >> mkbox = BRepPrimAPI_MakeBox(gp_Pnt(fp1[0],fp1[1],fp1[2]), >> gp_Pnt(fp2[0],fp2[1],fp2[2])) >> s1 = mkbox.Shell() >> e = TopExp_Explorer() >> for i in range(1000000): >> print i >> e.Init(s1, TopAbs_FACE) >> while e.More(): >> sh = e.Current() >> e.Next() >> if not (i % 1000): >> print 'Collecting garbage...' >> gc.collect() >> while 1: >> pass >> >> >> Not sure if this is a known issue or not, but it certainly makes the >> wrapper problematic for our current purposes. If you can point me at the >> right place in the wrapper generator I can maybe try and help. >> >> Thanks, >> Frank Conradie >> Qfinsoft >> >> _______________________________________________ >> Pythonocc-users mailing list >> Pythonocc-users@gna.org >> https://mail.gna.org/listinfo/pythonocc-users >> > > > _______________________________________________ > Pythonocc-users mailing > listpythonocc-us...@gna.orghttps://mail.gna.org/listinfo/pythonocc-users > > > _______________________________________________ > Pythonocc-users mailing list > Pythonocc-users@gna.org > https://mail.gna.org/listinfo/pythonocc-users > >
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users