Thanks for reminding! I looked at the code, and observed the gloal new dict might leak memory.
Calling pypy_execute_source_ptr() multiple times might be a common usage: you might have several python files to execute, or you might get python code segment from input one by one ... I am thinking could we have better ways to do such calls, e.g.: pypy_initialize(); pypy_execute_source_ptr() #call many times ... #clean up pypy_execute_end(); ... #to start a clean new session pypy_initialize(); pypy_execute_source_ptr(); ... pypy_execute_end(); On Sun, Aug 16, 2015 at 12:24 AM, Maciej Fijalkowski <fij...@gmail.com> wrote: > On Sat, Aug 15, 2015 at 4:09 PM, Armin Rigo <ar...@tunes.org> wrote: > > Hi Yicong, > > > > On 11 August 2015 at 14:38, Yicong Huang <hengha....@gmail.com> wrote: > >> pypy_execute_source_ptr(pyBuffer, &ptr); > > > > The documentation recommends to call pypy_execute_source_ptr() only > > once. I've fixed anyway the particular problem you are encountering > > when calling it multiple times, in 20f74886a28e. > > > > > > A bientôt, > > > > Armin. > > Note that if you execute it many many times, you will leak memory. >
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev