Introduced new remove method for weak pointers.