My application can only process up to a certain number of entry in the map structure, how do I specify that limit in my code so that my code does not get overwhelmed (for lack of better term). Is there a way to specify the max limit when defining the variable of type map?
Thanks
There’s no way to set a limit when instantiating the map, though I supposed you could have your own safe guard when accessing it. For example:
You could possibly create your own map class that encapsulates these checks.