mk-soft wrote:@Olli
Unnecessary ...
AllocateStructure and FreeStructure take care of this.
No, it does not take care of this. It does a specific job, but does not make all the jobs. Recursive object :
Code: Select all
Structure key
name.s
type.i
Array *ex(3) ; can point to an other key
EndStructure
And the additional 8 bytes of structure information don't hurt either.
Your argument is for the old method I use : just 8 bytes (and 4 bytes on X86). It is everything which stays after a total free of the memory when I work manually. So I agree : it doesn't hurt either.
For the whole structured object I allocate and free in memory, once the object is freeed, it just stays a pointer. It is not the way of
AllocateStructure() and
FreeStructure() where the whole structured variable ever stays in memory (excepted non-constant sized objects).
An other point : how to get an unique procedure to manage a recursive node, whatever the position of the node in the tree (root or not). If I differenciate by dupplicating all the set of the procedures handling a node, I am not sure the convenients not to type a '*' star character, are perfect...