<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MapSchema clear()]]></title><description><![CDATA[<p>Hi there,</p>
<p>We're running into some issues with a MapSchema that we are trying to synchronize between the server and client. We want to clear the map via <code>map.clear()</code> and have the changes propagated to the client. What should we be implementing on the client side, <code>onRemove</code> that removes each element in the map by id or <code>onChange</code> on the parent property as a bulk change?</p>
]]></description><link>http://discuss.colyseus.io/topic/529/mapschema-clear</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Jul 2026 16:00:55 GMT</lastBuildDate><atom:link href="http://discuss.colyseus.io/topic/529.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 27 Oct 2021 22:32:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MapSchema clear() on Wed, 27 Oct 2021 22:33:03 GMT]]></title><description><![CDATA[<p>Hi there,</p>
<p>We're running into some issues with a MapSchema that we are trying to synchronize between the server and client. We want to clear the map via <code>map.clear()</code> and have the changes propagated to the client. What should we be implementing on the client side, <code>onRemove</code> that removes each element in the map by id or <code>onChange</code> on the parent property as a bulk change?</p>
]]></description><link>http://discuss.colyseus.io/post/1640</link><guid isPermaLink="true">http://discuss.colyseus.io/post/1640</guid><dc:creator><![CDATA[alee]]></dc:creator><pubDate>Wed, 27 Oct 2021 22:33:03 GMT</pubDate></item><item><title><![CDATA[Reply to MapSchema clear() on Wed, 27 Oct 2021 22:49:21 GMT]]></title><description><![CDATA[<p>It looks like running <code>map.forEach( (elt) =&gt; map.delete(elt.id) )</code> on the server side triggers the <code>onRemove</code> on the client side properly, is this the recommended way to clear a <code>MapSchema</code>?</p>
]]></description><link>http://discuss.colyseus.io/post/1641</link><guid isPermaLink="true">http://discuss.colyseus.io/post/1641</guid><dc:creator><![CDATA[alee]]></dc:creator><pubDate>Wed, 27 Oct 2021 22:49:21 GMT</pubDate></item><item><title><![CDATA[Reply to MapSchema clear() on Invalid Date]]></title><description><![CDATA[<p>It seems there's no clear function in a map.<br />
How about renew your MapSchema?</p>
]]></description><link>http://discuss.colyseus.io/post/1642</link><guid isPermaLink="true">http://discuss.colyseus.io/post/1642</guid><dc:creator><![CDATA[COCO]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to MapSchema clear() on Invalid Date]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/873">@coco</a> hi, sorry for the necro, but I'm curious if this method will leave memory leaks or will colyseus handle the cleanup on its own. Thanks!</p>
]]></description><link>http://discuss.colyseus.io/post/2274</link><guid isPermaLink="true">http://discuss.colyseus.io/post/2274</guid><dc:creator><![CDATA[sleepinggamogamo]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>