Memory leak fix: init_style can be called multiple times. Deallocate potential object before reallocating.