Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (20 sloc) 396 Bytes
package dpl
import scala.collection.mutable.HashSet
case class ObjectRef(location : Node, ref : Int) {
ObjectRef.refs += this
private var usageCount = 0
def resetUsageCount = {
usageCount = 0
}
def incrUsageCount = {
usageCount += 1
}
}
object ObjectRef {
var refs = new HashSet[ObjectRef]
def resetAll = {
for (r <- refs) {
r.resetUsageCount
}
}
}