== Why is this an issue?

Leaking resources in an application is never a good idea, as it can lead to memory issues, and even the crash of the application. This rule template allows you to specify which constructions open a resource and how it is closed in order to raise issue within a method scope when custom resources are leaked.

== Resources

=== Related rules

* S2095 - Resources should be closed


ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

=== Message

Close this "xxx".


=== Parameters

.constructor
****

the fully-qualified name of a constructor that creates an open resource. An optional signature may be specified after the class name. E.G. "org.assoc.res.MyResource" or "org.assoc.res.MySpecialResource(java.lang.String, int)"
****
.factoryMethod
****

the fully-qualified name of a factory method that returns an open resource, with or without a parameter list. E.G. "org.assoc.res.ResourceFactory#create" or "org.assoc.res.SpecialResourceFactory #create(java.lang.String, int)"
****
.openingMethod
****

the fully-qualified name of a method that opens an existing resource, with or without a parameter list. E.G. "org.assoc.res.ResourceFactory#create" or "org.assoc.res.SpecialResourceFactory #create(java.lang.String, int)"
****
.closingMethod
****

the fully-qualified name of the method which closes the open resource, with or without a parameter list. E.G. "org.assoc.res.MyResource#closeMe" or "org.assoc.res.MySpecialResource#closeMe(java.lang.String, int)"
****


'''
== Comments And Links
(visible only on this page)

=== relates to: S2095

=== on 1 Mar 2016, 18:36:07 Ann Campbell wrote:
\[~didier.besset] I've added the parameter we discussed and made some additional changes to the param descriptions. 

=== on 12 Jul 2016, 20:12:17 Ann Campbell wrote:
FYI [~nicolas.peru] I'm unassigning this from Didier

endif::env-github,rspecator-view[]
