dev/core#2073 Fix a real live leak
authoreileen <emcnaughton@wikimedia.org>
Wed, 30 Sep 2020 05:44:19 +0000 (18:44 +1300)
committereileen <emcnaughton@wikimedia.org>
Wed, 30 Sep 2020 05:44:19 +0000 (18:44 +1300)
commit3e8437f31f2540031b8e6bbb954434c66cd17de9
tree34002d107365a7149a2ed0913350fb853e995dc3
parent4fc8726b010aea1f6547e6b971c496b474f362f0
dev/core#2073 Fix a real live leak

I used the same methods I had been playing with on the test class on a contribution
import script and found that the object that was increasing in memory in tandem with
me increasing iterations was an instance of DB_result

I tracked it down to here. In essence our main DAO functions clean up after themselves - e.g
when the DAO is destructed it cleans up the globals it has created.

However, this older ->query() function does not do that and each time is is called increases it's memory hold.

It's also worth better caching in this function...
CRM/ACL/BAO/ACL.php