Out Of Memory:

Former Member
Former Member
My app uses a dictionary with unknow number of elements of integers.
The dictionary can't grow beyond a size of ~120.

Since memory for datafields is very tight and there is no trap for this error,
i wonder how to handle this.
  • The trick is to limit the number of elements to avoid running out of memory.

    Depending on what your map contains, you might need to make it a cache that only stores N elements, and expires old ones as new ones come in. Another thing might be to reduce the size of what you are storing. If you are storing Lang.Double objects and can get away with it, switch to using a Lang.Float.