The graph variable in the EdgeRenderer has been replaced with a weak reference. Previously, in the vertex and port renderer, the graph variable was removed as, since the renderers have one static instance, the graph object instance could outlive its intended lifespan. Removing the graph instance in the edge renderer is not possible under the current architecture and so a weak reference is now used instead. It is recommended that if you sub-class EdgeRenderer and require an attribute of the graph, that you create a local renderer attribute and copy the value over in getRendererComponent(). See highlightColor in getRendererComponent() of EdgeRenderer as an example. This local variable is then used instead of the direct value from the graph.
Note that this issue did not cause a memory leak, as such. It is more a static memory footprint. This meant that one graph instance would exist until another was created and if the graph instance referenced a large number of cells with large user objects, this could waste excessive memory. The version number has had to go to 5.8 to indicate that a few users might not have binary compatibility, but the changes required, if any, are trivial.