answered 6 years ago
I reported this memory leak as trac ticket #27536.
A workaround is to replace RDF(pi) by RDF.pi().
RDF(pi)
RDF.pi()