Reputation: 83
Using validators like this:
public class FormFieldValidator {
[...]
public Validator getCallsignValidator() {
return new Validator() {
[...]
};
}
[...]
}
Does this mean that always that ZK invokes the validator a new validator instance is created , so for example when we are testing our validators they stay on memory , or worse , they stay referenciated by ZK?
So my question is:
Is there a better way ?
Upvotes: 0
Views: 106
Reputation: 170
Yes, in this code snippet every time a new validator object would be created and would stay in memory as long as the reference to this validator exists anywhere.
Upvotes: 1