Bug #2082
Every behavior is instantiated when any is run
Start date:
10/07/2012
Due date:
% Done:
0%
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 over 10 years 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.