PakhomovAlexander commented on code in PR #1929:
URL: https://github.com/apache/ignite-3/pull/1929#discussion_r1176136589
##########
modules/configuration/src/main/java/org/apache/ignite/internal/configuration/ConfigurationRegistry.java:
##########
@@ -96,8 +83,11 @@ public class ConfigurationRegistry implements
IgniteComponent, ConfigurationStor
/** Configuration change handler. */
private final ConfigurationChanger changer;
- /** Configuration generator. */
- private final ConfigurationAsmGenerator cgen = new
ConfigurationAsmGenerator();
+ /** Runtime implementations generator for node classes. */
+ private final ConfigurationTreeGenerator generator;
+
+ /** Flag that indicates if the {@link ConfigurationTreeGenerator} instance
is owned by this object or not. */
+ private boolean ownConfigTreeGenerator = false;
Review Comment:
Technically you are right, we might write `cgen = null`. But this is
something hidden. How developers might know that they should nullify the link
because we don't want them to hold the link and produce memory leaks?
I decided to move this contract into the place where contracts are defined –
the interface. I think a clear declaration of `close` method helps developers
to understand how to work with the object.
--
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]