in reply to Dereferencing question

You can empty @a any time you want to by assigning an empty list to it. If nothing else references the hashes referenced by @a, that will free them.

As for removing @a itself from memory? Not until every reference to it disappears. Subs A and fillIt reference it, so those subs would need to be freed to remove @a from memory.