Hmm... it works with my behavior.
Try logging the array to the console every step of the way. You can verify this is added to the array by logging it to the array before and after. If it's resetting to empty every time then something is amiss.
The actual oncreate function in my plugin looks like this:
behtypeProto.onCreate = function()
{
if(!this.behavior.state)
{
this.behavior.state={
objList:[],
enabled:true,
sortOnce:false
};
}
this.state = this.behavior.state;
this.isoList = this.state.objList;
};[/code:p2uj6fho]
The only difference is I put the array in an object first, but that shouldn't be necessary.
Otherwise i'm adding and removing from it in the same way.