Mystery Solved! (SPDisposeCheck Missing Memory Leaks?)

Evidently the reason some memory leaks from Roger Lamb’s blog didn’t appear in my SPDisposeCheck test have to do with some offending sample code being optimized out when compiled to release mode. When compiling to debug all the offending samples are identified by SPDisposeCheck. Note the differences identified in Reflector.

 
 

Release Version:

 
 

 
 

Screen clipping taken: 3/20/2009, 2:32 PM

 
 

 
 

 
 

Debug Version:

 
 

 
 

Screen clipping taken: 3/20/2009, 2:33 PM

 
 

 
 

 
 

Thanks Matt Ranlett and Paul Andrew for solving the mystery.

Advertisements

One Response to “Mystery Solved! (SPDisposeCheck Missing Memory Leaks?)”

  1. SPDisposeCheck Missing Memory Leaks? « Stephen Vick’s Blog Says:

    […] when calling GetCustomListTemplates method when creating a custom list from a ListTemplate. Mystery Solved! (SPDisposeCheck Missing Memory Leaks?) […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: