in reply to Re: Re: Yet another Embedding question
in thread Yet another Embedding question

A solution has been found!

I moved the compilation of the perl script  perl_parse out of the loop and passed the pointer to the memory around in C - this cut the memory loss from 1072 down to 8 per message. Much more manageable!

Thanks all