Menu

#178 Missing export of mm_free

For_2.0
closed-wont-fix
nobody
5
2011-02-13
2010-08-23
Anonymous
No

As evbuffer_readln() uses mm_malloc() to allocate the returned value there should be a way to call mm_free() on it to.

Might not be isolated to 2.0, just the version I've been using now (2.0.6)

Discussion

  • Nick Mathewson

    Nick Mathewson - 2010-08-23

    Hm. My original idea here was that since any function that replaces free() as used by mm_free() is provided by you, you would know what function to call.

    That is, if you used event_set_mem_functions() to replace free() with my_free(), then you would just call my_free() on anything allocated by libevent for you. Make sense?

    That said, there's no inherent reason we couldn't rename event_mm_free_() to event_mm_free() and expose it in the headers, if there's some reason that it's hard to call the right free() function on returned memory.

     
  • Nick Mathewson

    Nick Mathewson - 2011-02-13

    Closing as not-a-bug; making this point even more clear in the documentation.

     
  • Nick Mathewson

    Nick Mathewson - 2011-02-13
    • status: open --> closed-wont-fix
     

Log in to post a comment.