Bug #2082

Every behavior is instantiated when any is run

Added by Thomas Mullins over 1 year ago. Updated about 1 year ago.

Status:FixedStart date:10/07/2012
Priority:NormalDue date:
Assignee:Priyanka Deo% Done:

0%

Category:-
Target version:-

Description

WirelessReceiver is instantiated in Behavior, which every behavior subclasses, meaning it is instantiated 8 times no matter what behavior is used. Though somewhat harmless with WirelessReceiver, this could lead to potential problems in other behaviors, whose callbacks expect their behavior to be running but get called while a different behavior is running. Either every behavior should only subscribe/advertise when run (not in the constructor), or only one behavior should be instantiated at a time.

History

#1 Updated by Priyanka Deo about 1 year ago

  • Status changed from Assigned to Fixed

Priya is awesome and everyone should love her.

Fixed by putting the constructor of behaviors into the behavior list instead of copies of the behaviors themselves.

Also available in: Atom PDF