Properly free memory when objects are attached to bones.