I have a question about ID generation for entities. For example, I generated 500 IDs and then i removed 50 IDs (from 100 to 150 (numbers)). How can i fill removed numbers with new IDs?
I mean i don’t want to create ID501, ID502, ID503…
I want to fill removed numbers ID100, ID101, 102…
Does anybody have an example how to check for empty IDs in the list? Thank you.
I suggest never reusing entity IDs. Theres no reason to do so and it can only cause confusion.
The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless there’s emotes that hint otherwise or there’s an increased use of exclamation marks and all-capital words.
@normen said:
I suggest *never* reusing entity IDs. Theres no reason to do so and it can only cause confusion.
The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless there's emotes that hint otherwise or there's an increased use of exclamation marks and all-capital words.
I definitely agree with this. There is no reason to reuse IDs. Use a long and you will never wrap, ever.
To reuse IDs you only make everything slower and cause potential problems if something holds onto an ID longer than you expect. Just don’t do it.