+ Start a Discussion

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



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.




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