Mummy, how are OutOfMemoryException instances born?

Reading the FXCop rules about weak identity locking targets made me wonder why these fellows had 'Weak Identity'
  1. System.OutOfMemoryException

  2. System.StackOVerflowException

That's because these exceptions only have on instance per CLR instance, as the CLR automatically allocates memory for them on startup, and thus doesn't run out of memory while trying to tell the user he ran out of memory.

The more you know! ™

No comments:

Post a Comment

Please leave your comments in English or French and I will be pleased to answer them if you have any questions.

Spammers will be walked down the plank matey. Arrr!