I’m writing a resource manager, which is required to be fast and has small memory foot-print. For example, I have an resource class
class Abc
{
string m_name;
string m_path;
string handle;
void SomeFunctions();
}
And so on. Now I create and List< Tuple< int,Abc>> and add 5000 items to it. How much memory will it consume?
One more question: Can I find items base on handle number only, which is the int part of the Tuple?
Memory consumption is very difficult to estimate without knowing the average string sizes.
If the integer handle is unique per
Abcinstance, you should use aDictionary<int, Abc>instead.