I was reading about memory leaks in managed code and wondered if it was possible to create this in C# unsafe code?
unsafe
{
while(true) new int;
}
I wasn't sure if this would be caught by the GC if this was running as unsafe code?
Thanks
The unsafe
keyword just allows you to use unsafe code (pointers).
It doesn't change the semantics of ordinary code at all.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With