I have Dashlane installed, which makes it so that all passwords in my browser get typed automatically. It's actually really useful, except for a single flaw: it leaks so much memory. Seriously. After a couple days of running it, it'll have taken over nearly 3 GB of memory and slow down the whole computer.
I'm trying to make a program where it checks Dashlane's memory usage every once in a while and force quits it once it reaches, say, 1 GB.
How can I automatically check if the memory usage of a program goes above a certain number?