Axapta TreeNode memory usagge problem

Ok, look, here ive got an example of my situation.

static void Job3(Args _args)
TreeNode treeNode;
TreeNode release;
int i;

treeNode = TreeNode::findNode("\Forms\").AOTfirstChild();

i = treeNode.applObjectLayerMask();
treeNode = treeNode.AOTnextSibling();
release = treeNode;

print(release.AOTname() + “Released”);
release = null;

So… calling applObjectlayerMask() consumes a lots of memory, either SysTreeNode’s IsNodeInLayer does the same, but only once - if i loop through all the forms for example with these methods, memory goes from 100.000 to 400.000 atleast sometimes, but if i do it again, it doesnt rise, yet - treeNodeRelease and null doesnt help. Any suggestions ?

one more issue - doing the same for classes as example, it doesnt consume memory.

You need to call treeNode.treeNodeRelease() in your loop.