Pengzna commented on code in PR #2649:
URL:
https://github.com/apache/incubator-hugegraph/pull/2649#discussion_r1818302505
##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/IdGenerator.java:
##########
@@ -196,11 +196,11 @@ public String toString() {
}
}
- public static final class LongId extends Number implements Id {
+ public static class LongId extends Number implements Id {
private static final long serialVersionUID = -7732461469037400190L;
- private final long id;
+ protected Long id;
Review Comment:
no, because primitive type `long` can't be set to null by hand. We need a
data structure that can be manually set to null **so that it can be GCed
immediately** to free up memory. Primitive long can only be GCed along with the
original object.
<img width="321" alt="image"
src="https://github.com/user-attachments/assets/4661d1ab-6b8a-474c-9843-949466ef1e2e">
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]