EAGLView init bug

EAGLView init bug
0.0 0


Currently, to create an EAGLView object, two initXXX method need to be called. For example:

  • (id) viewWithFrame:(CGRect)frame
    return [[[[self alloc] init] initWithFrame:frame] autorelease];

This is not quite right. By right, a valid object should be created with only “[[self alloc] initWithFrame:frame].”

One solution is to rename init to something like commonInit (also hide it from header file), and call it in all other init functions.


Thx for your suggestion. The invoking do looks a bit odd.
An issue #345 is created for this bug. We will fix it asap.