X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace%2Fretrace.py;h=2e0350107a64f7e17ced6f9145acc462053816e2;hb=7bd3b9c302b5e4f252736de06ec9233732164140;hp=8198b0a31e19054b0c0e893d49b088e3cac8f809;hpb=bd0863402aa31ad674ca248ba82dfcc1ee90afea;p=apitrace diff --git a/retrace/retrace.py b/retrace/retrace.py index 8198b0a..2e03501 100644 --- a/retrace/retrace.py +++ b/retrace/retrace.py @@ -422,6 +422,14 @@ class Retracer: print ' %s(%s);' % (function.name, arg_names) def invokeInterfaceMethod(self, interface, method): + # 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 ' }' + print ' _obj_map.erase(call.arg(0).toUIntPtr());' + arg_names = ", ".join(method.argNames()) if method.type is not stdapi.Void: print ' %s __result;' % (method.type)