C# How to track down a font disposal

280 Views Asked by At

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.

1

There are 1 best solutions below

2
On

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.