If one creates an UnsafeMutableRawPointer using allocate() and then calls deallocate(), isn't the pointer pointing to now-arbitrary memory?

How does one safely "forget" the pointer? Only thing I can think of is making the UnsafeMutableRawPointer property optional so it can be set to nil after the deallocate() call.

0

If you have a fediverse account, you can quote this note from your own instance. Search https://ieji.de/users/puppethead/statuses/116099248107509693 on your instance and quote it. (Note that quoting is not supported in Mastodon.)