I think I found the cause of a huge memory leak I was having in one of my apps.
I was rendering graphs from some data I had and was using code like what is found below:
For i As Integer = 0 to Min(Width/BAR_WIDTH,Data.Ubound) ... End For
I was having quite a horrible memory leak in my webapp (4+gb in less than a few days) and tracked it down to 10's of 1000's of empty Double() arrays each with 2-3 references. I had no idea where these were coming from as nowhere in the app do I create empty Double() arrays. When I get the count once first and store it in a variable then use that to loop through, there is no leak. I just wanted to not loop past the data if it were to change while rendering. This also appears to be happing for Max as well.
Dim n As Integer = Min(Width/BAR_WIDTH,Data.Ubound) For i As Integer = 0 to n ... End For
Has anyone found that they are having this issue or know of a bug report for it? If not, I will post a bug report.