1

I have a font which is being disposed of which is causing an exception and I can't find where the font is being disposed. I have a feeling it is being disposed of by print preview. Can someone recommend how to track this issue down?

Thanks.

mjv
  • 73,152
  • 14
  • 113
  • 156
Nathan
  • 5,059
  • 16
  • 48
  • 61

1 Answers1

5

You could try to set a breakpoint in Font.Dispose:

Configuring Visual Studio to Debug .NET Framework Source Code

I'm not sure if the particular source code for the Font class is included, but you could give it a try.

dtb
  • 213,145
  • 36
  • 401
  • 431
  • 2
    The point where the exception is thrown is probably very different from where the font is disposed. – H H Nov 13 '09 at 22:57
  • It sounds to me like the exception thrown isn't providing insight as to when/who was responsible for disposing the font in the first place. – Mike Atlas Nov 13 '09 at 22:57