[Gambas-user] Circular references and allocations non freed

Benoît Minisini gambas at ...1...
Mon Sep 14 20:38:51 CEST 2015


Le 14/09/2015 20:34, martin p cristia a écrit :
> Me neither.
>
> Can't isolate it. It's a strange errror because those structs are
> created only once as global variables.
> In example:
> ' Gambas module file
> ' modEstru
>
> Public Struct datosSTRUCT
>       magic As String
>       proyecto As String
>       descripcion As String
>       totalnudos As Integer
>       totalbarras As Integer
>       totalcargasnudo As Integer
>       totalcargasplacas As Integer
>       totalplacas As Integer
>       TotalGrupos As Integer
>       totalapoyos As Integer
>       totalsecciones As Integer
>       totalSectores As Integer
>       tipo As Integer
>       totalcargasbarra As Integer
>       unidades As Struct UnidadesSTRUCT
> End Struct
>
> Public datos As Struct DatosSTRUCT
>
>
> then, in the whole program (8 modules and 18 forms),  they are used like
> this:
>
> modEstru.tipo = 3
>
> or
>
> if modEstru.TotalGrupos = 0 then ........
>
> and so on
>
> AFAIK they are static variables I use for flags for something, how can
> they be re allocated thos amount of times???
>
> or even worse, how can they be circular on any way???
>

No idea... Can you send your project?

-- 
Benoît Minisini




More information about the User mailing list