0

In my vb.net application, I am making a third party API call which makes use of byte[] internally. since byte[] is huge (around 300 MB) its allocated in LOH.

After the API call I call dispose of the third party object before it goes on to make subsequent API calls. I mean after every API calls objects are disposed properly.

so first time it worked well. second time when the API call is made it throws out of memory error.

When used profiler, found that approximately 300 MB is used in LOH. is this error because of not enough space in LOH? if yes what is the maximum size available for LOH? Why I can see the byte[] still in LOH when the second time API call is made ,even after I call dispose on the object ? mine is a 32 bit application.

in task manager its showing up nearly 700mb totally used by my application. Since a process has 2 GB of space 700 MB is pretty much safe I believe.

Charlieface
  • 52,284
  • 6
  • 19
  • 43
user2504955
  • 41
  • 1
  • 5

0 Answers0