Class CloseableResourceToBeChecked
java.lang.Object
org.ek9lang.compiler.common.CloseableResourceToBeChecked
Checks if a symbol should be tracked as a closeable resource.
A closeable resource is a local variable whose type has a close() operator.
This predicate is used to identify variables that need to be tracked for resource leak detection. The rules are:
This predicate is used to identify variables that need to be tracked for resource leak detection. The rules are:
- Must be a VariableSymbol (not a type or function)
- Must not be a property field (fields are managed by the containing aggregate)
- Must not be an incoming parameter (caller's responsibility)
- Must not be a returning parameter (callee transfers ownership)
- Type must have a close() operator with no parameters and no return
- Type must NOT be Stdin, Stdout, or Stderr (these are global, never really closed)
-
Constructor Details
-
CloseableResourceToBeChecked
-
-
Method Details
-
test
-