removing a key in all maps

lundi 20 octobre 2014

Is there anything wrong with this logic...

RE: $(key) is a database connection



It may exists in any map or even more than one map (multiple instances)





// Loops through all maps and closes all key values that it finds.

while($(key) != null) {

$(key).close();

}



...I am wondering if this would work and what about removing the entry in the map. What happens when .close() is called? Is the entry still there?

globalMap.remove(key);

globalChannelMap.remove(key);

channelMap.remove(key);





removing a key in all maps

0 commentaires:

Enregistrer un commentaire