I'm not a native english speaker, so... let's look at the code. :)
1) use st_free_table instead of xfree for ser->{str,trait,obj}_cache cleaning up;
simple test case:
1_000_000.times {RocketAMF::serialize("abc", 3)}
2) xfree the str refs and trait refs which store in the {str,trait}_cache->key;
simple test case:
ser = RocketAMF::Serializer.new(RocketAMF::ClassMapper.new)1_000_000.times {ser.serialize("abc", obj)}ser = nil
I'm not a native english speaker, so... let's look at the code. :)
1) use st_free_table instead of xfree for ser->{str,trait,obj}_cache cleaning up; simple test case:
1_000_000.times {RocketAMF::serialize("abc", 3)}
2) xfree the str refs and trait refs which store in the {str,trait}_cache->key; simple test case:
ser = RocketAMF::Serializer.new(RocketAMF::ClassMapper.new)
1_000_000.times {ser.serialize("abc", obj)}
ser = nil
Thanks,
Hanfei