[Gambas-user] Allocations non freed. (solved!)

Alberto Torres dithi at ...600...
Fri Sep 3 23:57:12 CEST 2004


Solved!! It seems that kgRegion only frees correctly when it deletes 
itself because circular references (kgRegion.parent)

In frmAnimEd:

PUBLIC SUB Form_Close()

  DIM img AS kgImage
  DIM rgn AS kgRegion
  FOR EACH img IN Images
    FOR EACH rgn IN img.Regions
      rgn.Delete()
    NEXT
    img=NULL
  NEXT

END


I think my project has interesting features for making examples or 
tutorials. You can use the code freely, attached in my previous post

Cheers

Alberto Torres a.k.a DiThi

Alberto Torres escribió:

> I start my project, draw some 'regions' in the 'image region editor' 
> and then, when it ends I get this output:
>
> WARNING: circular references detected
> kgImage (1)
> kgRegion (3)
> WARNING: 15 allocation(s) non freed.
>
> How can I avoid this? are the allocations non freed caused by circular 
> references?
>
> I have attached the project. I'm using gambas 0.98a compiled from 
> source (using debuild) in debian sid.
>
> A question: why in the file .project there is a line with an absolute 
> path like this?:
> ExecPath=/home/dithi/Proyectos/koge/kogedesigner/kogedesigner
>
> Cheers
> DiThi
>






More information about the User mailing list