in reply to Memory leak dealing with AVs

I haven't compiled your code, but are you leaking the SVs inside the AVs? I can never remember how to free things unless I use the stack macros.