How to clear specific key/value from user data?

I’ve found clearLocalData, but I want to clear just a specific key-value pair, not everything. If I set the value to nil, will the key be marked for gc?

Yes. The std behavior of variables is to be removed when they are set to nil.

Thanks, Jmv, and sorry to be dense here, but will the key be removed too? I don’t want a bunch of unused keys piling up in memory. Uh, maybe I need to take the time to look at the underlying implementation…I’m just getting back to programming after a couple of years off and maybe need to spend a bit more time on fundamentals. I was thinking hash table and seem to recall implementations where keys still around unless removed.

@Kjentoft One thing you need to be aware of when using local/project data is that if you delete the project, the local/project data isn’t deleted. So if you make test projects that create local/project data and then delete the projects without first getting rid of the data, the data will still be there taking up memory. If you create another project with the same name, you can read the local/project data that was there before creating any.

Thanks, Dave, that’s a handy bit of info. Guess I have some cleaning up to do while I still remember the names of my deleted temporary ‘backups’.

Ugh. That’s just ugly… and there’s no way to access project data from another project?