[emboss-dev] AcdPAcd destructor
pmr at ebi.ac.uk
Mon Apr 24 08:00:15 UTC 2006
C Thomas wrote (in June 2005):
> Does the CVS version of emboss have a destructor for the AcdPAcd
object? I would like to send data through ACD more than once during the
lifetime of my program. ajAcdExit() doesn't seem to do anything... I
was hoping it would clean things up so I could run ajAcdInitP() again,
but no luck.
We have implemented this. Many thanks for the suggestion.
We are now working through all the EMBOSS applications to check that
they can all clean up memory on exit (so far no problem, but there are a
lot of applications :-) .
This is in the current CVS developers code, and will be in release 4.0.0
in the summer.
Any object returned by an ajAcdGet... call is owned by the calling program.
One small change: ajAcdGetListI and ajAcdGetSelectI should be replaced
by ajAcdGetListSingle and ajAcdGetSelectSingle if you want the choice
from a list where only one option can be selected. This allows ajAcdExit
to clean up the memory for the list of options cleanly (the calling
program owns the selected option, the AcdPAcd internal object owns the
list). The old calls are needed if you really want only one of the
choices for one of your own applications (this never happens in current
EMBOSS programs). There should be only a small memory leak in that case.
More information about the emboss-dev