After trying 2 or 3 tricks, i´ve made this my standard for use of memory variables:
1. Define them as public in the load event of the form
2. Release them in the destroy event.
This works fine to me.
Hope it´s helpful to you!
From an easy point of view, you could create a new method in the form for every procedure you have in fpd and copy the code. But.... I´m not really sure about this if you are planning a multi - tier app. Maybe trying to build a dll with the set of procedures could be better.
There´s a better life... Just it´s more expensive!
Cristóbal Manrique M.