X-Git-Url: https://git.cworth.org/git?p=apitrace;a=blobdiff_plain;f=retrace%2Fretrace.py;h=70926c0b39d755fe293286b88e6b86fbe3df7441;hp=d09d72aa2ca46aff0c10380463b51cfcb455c1c7;hb=a936afc3ebb349c3aec8b5a595706f3c9749ad37;hpb=677f59a10bf71b0bf1b73bfc9c1accbf719fafad diff --git a/retrace/retrace.py b/retrace/retrace.py index d09d72a..70926c0 100644 --- a/retrace/retrace.py +++ b/retrace/retrace.py @@ -478,10 +478,9 @@ class Retracer: # On release our reference when we reach Release() == 0 call in the # trace. if method.name == 'Release': - print ' if (call.ret->toUInt()) {' - print ' return;' + print ' if (call.ret->toUInt() == 0) {' + print ' retrace::delObj(call.arg(0));' print ' }' - print ' retrace::delObj(call.arg(0));' arg_names = ", ".join(method.argNames()) if method.type is not stdapi.Void: