Philosophistry Wiki
"The secret to life is knowing when to leave"

Assuming this quote is memetic wisdom (See: Memetic Wisdom), it means the majority of life's problems happen when we linger too long. It could be true. In Buddhism, the solution to life's problems is often to let go of attachments. Consider a job, a relationship, or a home. Each of those represents a subscription that renews somewhere between monthly and yearly. Together they represent a large portion of the circumstances that impact our happiness. Even though happiness is mostly determined by temperament and intentional activities, the circumstances that become the subject of our vexations can very well be influenced by just one job, just one relationship, or just one home. If we improperly renew our subscription to any one of these, it could make us unhappy for anywhere from a month to a year. Knowing when to quit could be the key to happiness. Or the advice could just be a means of canning relief in the form of a bleak conclusion.