Re: Memory de-allocation question

new topic     » goto parent     » topic index » view thread      » older message » newer message

OE uses ref counts. So when you run 's = {}' that would cause those refs to hit zero. I'm not sure if it frees up right away, but I'm sure that it'd eventually get freed up since the refs get set to zero right away.

The other thing is that ref counts are decremented when variables go out of scope. So even if you didn't run 's = {}' if s is a variable that can go out of scope (e.g. it's in a routine) then it will get freed up eventually.

That doesn't apply to global variables, which never go out of scope and which you'd have to free up manually as above.

Note that this is refering to OE. I am not familiar with this part of the Phix inernals and don't know how it works there.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu