Skip to content

manifold.stream.graph/handle->downstreams size always grow #169

Open
@defclass

Description

@defclass

Hello Zach, I am not sure I encounter a memory leak problem. In my use case, we want to connect to server, and send some packet repeatly by aleph websocket implement. After connected, use two stream to transform data.

(defn- wrap-websocket-stream
  [s]
  (let [out (s/stream)]
    (s/connect (s/map json/generate-string out) s)
    (s/splice out (parse-json-stream s))))

We found var size of manifold.stream.graph/handle->downstreams will always grow.

Also, can repreduce the case to use below code.

(dotimes [i 5] 
  (let [a (s/stream)
       b (s/stream)]
   (s/connect a b)
   @(s/put! a "a")
   (s/close! b)
   (s/close! a)
   (prn (.size manifold.stream.graph/handle->downstreams))))

It's entirely possible I'm using stream incorrectly, thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions