I can't follow you. `rval` is declared and initialized [a few lines before](https://github.com/Theano/Theano/pull/1809#discussion-diff-11735123L511) with `PyArray_SimpleNew`. It's not bound to any Python variable yet. Unless `PyArray_SimpleNew` does some bookkeeping, we're the only ones that have a reference to `rval`. There is no way anybody can decrease its reference count, is there?