Maximum size of List,Set,Map and String

Hope all are waiting for our Independence day celebration(For Indian's)

Today I got a new topic. I know its a small one. But I hope every body searched for this. Lets go through in deep. Apex has primitive data types. Those are Blob,Boolean,Date,Double,String etc. Each has their own property and limit. Example Boolean is 0 or 1, Double has minimum value of -2^63 and maximum value of 2^63. Apart from primitive type Apex has collections called List,Set and Map. While do operation on collection of records we will use this Apex collections.

As a developer while working on this collection.We must had a doubt how much record can List or set or map hold. To answer this question in Apex programming there is no limit on storing the record instead there a limit on heap size.



Heap size limits:
           Synchronous  : 6MB
           Asynchronous : 12 MB
           Email services: 36 MB
Lets go through what is heap size?
    It is in reference to the amount of memory used by the objects. When you create objects in Apex code, as with Java or any standard programming language, memory is allocated to store the objects. And that memory is allocated from the allocated heap.Think of it is a designated amount of memory you can use up in your Apex request.


Like if you like this article, Please comment if you have any suggestions.

Average: 3 (1 vote)