What is the difference between using static data, for instance arrays of strings, in a source file versus keeping data within a plist? Is it that static data invariably is loaded into memory but the data within a plist doesn’t have to be and can be accessed/referenced on the fly as needed by your app?
What is the difference between using static data, for instance arrays of strings, in
Share
It doesn’t make any difference in terms of memory – you load the whole plist into memory when accessing it.
You should write with simplicity and maintainabity in mind first – as @weltraumpirat says in comments, there are benefits to using a plist instead of writing your applications data directly into source code.
If you have so much data that you are having to consider the memory used to store it, then neither static data or a plist is right for you, and you should use a formal database where you fetch only the needed data into memory.