+7  A: 

Well you are keying on the size of the map, this seems like it may cause your problems.

So if you have 3 things in the map you will have

  1 => Obj1
  2 => Obj2
  3 => Obj3

if you remove one of these elements, say at 1, you will have

  2 => Obj2
  3 => Obj3

then later you go to insert, and set the key to "size() + 1", size will return 2, and you will try to insert at key 2 + 1 == 3. 3 is already taken. So it will either get overriden or fail (not sure how your find is working above).

Instead of inserting at the size + 1, I would check the last key and increment by 1 if thats how you want to manage the key.

Doug T.
+1 however, when you use insert(...) on a key that already exists, it's not overridden. The return value indicates whether the new value was inserted or not.
Steve Folly
depends if [] or insert(...) is used... which depends on the result of that funky find() call (s)hes got up there.
Doug T.
That is true, to deal with this I reorganize the list after deleting a object.Maybe that is the root of all evil or is in deletion but I cant find the error
A: 

Your question does not make any sense.

Yogi
Hehe this reminds mi South Park and the Chewbacca defence strategy :D http://en.wikipedia.org/wiki/Chewbacca_defense
Oh really???, I'll relax and forget this think
jejejeje just kidding :)