Fixed memory leak in bitmap builders