function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
atulit27atulit27 

Is memory allocated to null or blank fields of the record?

Hello,

 

I have an object and it has 10 fields which are null or empty for most of the records. I just wanted to know whether memory is being allocated to these fields or not as there is memory usage limit in the salesforce and I don't want to cross that due to these null or empty fields.

 

Thanks,

Atulit



Shashikant SharmaShashikant Sharma

Yes menory is allocated to null values as well .

 

For examples take this



List<Account> accts = new Account[]
         {new Account(), null, new Account()};
Defines an Account list with memory allocated for three Accounts, including a new Account object in the first position, null in the second position, and another new Account object in the third position