Steffen Mueller wrote: > On 12/17/2013 02:51 PM, Christian Walde wrote: >> After explaining in #p5p that outputs need to replace the inputs on the >> stack, this all makes a lot more sense. >> >> Steffen, you probably want to mention this fact early on in your article >> so the rest is more self-explanatory. :) > > I updated the article to mention this. > > --Steffen > I would change "At the end of each executed statement, the mortal stack is cleaned up and the reference count of each item on the stack is decremented, possibly causing the item to be freed[4]. Thus the name: items on the stack are mortal, soon to pass away." to "At the end of each executed statement, the mortal stack is cleaned up and the reference count of each item on the stack is decremented. If the caller does not take steps to save the SV from being freed, it will probably be freed[4]. Thus the name: items on the stack are mortal, soon to pass away." To explain that the caller, if it wants can keep around the SV. There is no guarantee they will be freed when the xsub returns, if all the SVs refcnt is 1.Thread Previous | Thread Next