Refactoring Blues
Jul. 26th, 2016 05:44 pmA while back, in order to improve the general behavior of my code in the Java environment, I changed a place where I was storing hot pointers to store IDs that could be used to look up the hot pointers instead. And the behavior became much better and cleaner.
Today, I realized that the behavior might be cleaner, but any "rename" operation on the objects that were referred to by the IDs was going to fail. See, when you're storing hot pointers, you can just rename the IDs that are internal to the objects that are being pointed to. When you are storing IDs, you have to find all of the objects that are storing the IDs and update them.
Phooey.
The C++ code is now updated; the Java code will follow shortly.
At least I found this myself...
Today, I realized that the behavior might be cleaner, but any "rename" operation on the objects that were referred to by the IDs was going to fail. See, when you're storing hot pointers, you can just rename the IDs that are internal to the objects that are being pointed to. When you are storing IDs, you have to find all of the objects that are storing the IDs and update them.
Phooey.
The C++ code is now updated; the Java code will follow shortly.
At least I found this myself...