enable gc in demo

This commit is contained in:
Kevin Jahns
2018-05-23 16:15:11 +02:00
parent c122bdc750
commit 9be256231b
2 changed files with 4 additions and 4 deletions

View File

@@ -48,7 +48,7 @@ const wsConnector = {
getRoom: function getRoom (roomName) {
let room = rooms.get(roomName)
if (room === undefined) {
const y = new Y(roomName)
const y = new Y(roomName, null, null, { gc: true })
y.on('afterTransaction', (y, transaction) => {
if (transaction.encodedStructsLen > 0) {
const encoder = new BinaryEncoder()