Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

erlzmq:term/1 does not release memory #27

Open
svn12345678 opened this issue Dec 12, 2011 · 1 comment
Open

erlzmq:term/1 does not release memory #27

svn12345678 opened this issue Dec 12, 2011 · 1 comment

Comments

@svn12345678
Copy link

Dear all,
I encountered a problem with regarding memory handle in erlzmq2.
Please kindly see the bleow:

-module(context_openClose).
-export(ctx_oc/0).

ctx_oc()->
    {ok, Context} = erlzmq:context(),
    io:format("*** erlzmq:term/1 return ~p ***~n",[erlzmq:term(Context)]).

start erl shell and run the following command

lists:foreach(fun(I)-> context_openClose:ctx_oc(), io:format("[~3..0B] ------~n",[I]), timer:sleep(1500)            end, 
    lists:seq(1,500)
        ).
...
*** erlzmq:term/1 return ok ***
[289] ------
** exception error: no match of right hand side value {error,enomem}
     in function  context_openClose:ctx_oc/0
     in call from erl_eval:do_apply/5
     in call from erl_eval:exprs/5
     in call from lists:foreach/2
----------------------------------------------------------------

It seems that erlzmq:term/1 does not release memory.
Any suggestion will be appreciated.

@yrashk
Copy link
Member

yrashk commented Dec 12, 2011

Thanks, will look into this. Can't tell what's wrong right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants