How to ensure that the wax will come off easily in a glass container?

I am experimenting with glass to hold my liquid wax in making candles. Some times the harden wax just slide off easily and sometimes it doesn’t. Does anyone out there know any tricks?