Hi, Tibor.
I experienced similar memory consumption problems with some procedures intensively iterating through records, especially with nested iterations.
The worst is that memory stays occupied even when all datasets are closed, after procedure finished the job...
Please, let me inform if you find a solution.
Regards,
Zlatko