Release Name: 0.3.1
Notes:
Clogger is Rack middleware for logging HTTP requests. The log format
is customizable so you can specify exactly which fields to log.
* http://clogger.rubyforge.org/
* clogger@librelist.com
* git://git.bogomips.org/clogger.git
Changes:
This release fixes a memory leak in the optional C extension due to
misuse of the Ruby C API. Users of the pure Ruby version are
unaffected.
Changes:
ext/clogger_ext/clogger.c | 2 +-
test/test_clogger.rb | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 1 deletions(-)
commit 4247fafd0f361d2373df7213a1a0028554e93d93
Author: Eric Wong
Date: Sat Feb 13 01:35:55 2010 -0800
ext: fix memory leak when reentrant/multithreaded
The optional C extension leaked memory due to improper use of
the Ruby API, causing duplicated objects to never be garbage
collected.
I misread the Data_Make_Struct/Data_Wrap_Struct documentation
and ended up passing NULL as the "free" argument instead of -1,
causing the memory to never be freed.
From README.EXT in the MRI source which I misread:
> The free argument is the function to free the pointer
> allocation. If this is -1, the pointer will be just freed.
> The functions mark and free will be called from garbage
> collector.
|