- set data to null to force garbage collection. Someone reported that the chat messages causes
overflow exception crashing flash in certain environment. Setting data to null prevents this from happening.
This commit is contained in:
parent
c22e41a1aa
commit
c318f03b5a
@ -47,6 +47,7 @@
|
||||
ChangeWatcher.watch(this, "data", dataChangeHandler);
|
||||
if (data != null) {
|
||||
chatMsg = data as ChatMessage;
|
||||
data = null;
|
||||
chatMsg.translateMessage();
|
||||
}
|
||||
|
||||
@ -64,6 +65,7 @@
|
||||
return;
|
||||
}
|
||||
chatMsg = data as ChatMessage;
|
||||
data = null;
|
||||
chatMsg.translateMessage();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user