pedestal/pedestal — pull request #209 by daemianmack (2013-09-14 14:01:42+00:00)
Title: Fix memory leak in push renderer's delete-id! function.

Current behavior leaves 'deleted' keys hanging around with nil values.

Instead, dissoc them entirely.

Let's say I have a Pedestal application that polls a Twitter feed, and I want to show the last 3 tweets, destroying the older tweets.

In my rendering logic, I'm responding to `:node-destroy` messages by calling `io.pedestal.app.render.push.handlers/default-destroy`.

When tweet D is `:node-create`d, tweet A is updated in the rendering data to have a nil value, as per the current behavior of `delete-id!`.

![example](https://dl-web.dropbox.com/spa/s4p7nbfvfh34fmn/zuebnpvk.png)

A few dozen tweets later, my rendering data contains one unwanted key for every element I've `:node-destroy`ed...

![example](https://dl-web.dropbox.com/spa/s4p7nbfvfh34fmn/1a0qg94u.png)

This patch resolves this behavior such that the keys are dissoced rather than nulled, so that final state now looks like...

![example](https://dl-web.dropbox.com/spa/s4p7nbfvfh34fmn/xt5xptyo.png)