I have a widget which is running out of memory on makewebrequest calls, the widget gets its data in a dictionary from a JSON via makewebrequest. On previous versions I was getting an out of memory response but worked around this by splitting it into 2 separate smaller requests but now it seems to now fall on the second one now as out of memory (-403) every time.
The first request gets a file of about 5k in size, from the simulator by the time it's converted into a dictionary and passed to my onReceive method the memory usage has risen by about 20k. Once it's parsed it's easy through the data it makes the second request but this one fails. I can't seem to get it to free up the memory from the first response before making the second request. I've tried setting the dictionary to null but I assume it's still referenced somewhere as the garbage collector doesn't seem to free it up, and I can't work out a way to wait for the memory to be released before sending the second request in a clean way
How much memory should these calls and dictionaries be taking up? Is there a way I'm missing to let the garbage collector know I'm done with the data object and to release the allocated memory so I can go ahead with the next request?
Cheers.