View Single Post
  #9   Spotlight this post!  
Unread 15-02-2012, 16:23
detruby detruby is offline
Dave Truby
AKA: Dave Truby
FRC #4145 (Wolf Pack)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Columbus
Posts: 11
detruby is an unknown quantity at this point
Re: SmartDashboard Vision Processing

I found the bug in edu.wpi.first.wpijavacv.WPIBinaryImage.java in project WPIJavaCV. The findContours() method was doing

final CvMemStorage storage = CvMemStorage.create();

without calling deallocate()

I moved the "storage" variable to an instance variable and added method

protected void disposed() {
super.disposed();
this.storage.deallocate();
}

all better now.
Reply With Quote