Error with 'Using' block

  • Thread starter Thread starter mike_milne
  • Start date Start date
M

mike_milne

Guest
Forgive me if this is an idiotic question - I'm not really a programmer, just a retired CGI artist playing about with image processing stuff.

I've been told that I should use 'Using' blocks wherever possible in graphics subroutines that get called often, to avoid garbage collection issues, and I've been doing that happily for years. However, today I've hit a snag, and can't for the life of me see what I'm doing wrong.

The first image shows two subs - The highlighted areas show the only difference between them. (A) uses a Dim statement, and (B) uses a Using block. If I call (A), it works fine. If I call (B) instead, I get a 'System.drawing.pdb not loaded' error shown in the other image.

Anyone have any ideas? I'm running Microsoft Visual Studio Community 2019, updated last week to Version 16.7.7

1623868.jpg

The error message:

1623869.jpg

Continue reading...
 
Back
Top