TINYGL: make consistent between allocation and free resource