I was wondering if it was possible to prevent memory of a object (class or struct) from being swapped to disk?
Edit: As for why I’ve been told some of the data I’m going to be working with cannot be written to disk.
I dont expect it to be left long enough for the data to be swapped out but thought it’s worth checking.
You might be looking for the
SecureStringclass, which will not be swapped to disk.