GL: added ref counting