开发者

Two calls to layerClass and initWithCoder, why?

开发者 https://www.devze.com 2023-02-23 01:55 出处:网络
2011-04-06 19:30:39.268 GLFun[531:707] Call开发者_如何学JAVAed! 2011-04-06 19:30:39.276 GLFun[531:707] 0x12e0e0

2011-04-06 19:30:39.268 GLFun[531:707] Call开发者_如何学JAVAed!

2011-04-06 19:30:39.276 GLFun[531:707] 0x12e0e0

2011-04-06 19:30:39.279 GLFun[531:707] CAEAGLLayer

2011-04-06 19:30:39.482 GLFun[531:707] Called!

2011-04-06 19:30:39.485 GLFun[531:707] 0x1322c0

2011-04-06 19:30:39.488 GLFun[531:707] CAEAGLLayer

Well, I've been studying the workings of a typical OpenGL ES example found in the XCode template library. I was wondering when does the layerClass get invoked (before or after the initWithCoder method). It turns out it's after the initWithCoder (Called! in the log). But I have something interesting happening, at least to me. I get a redundant call to init and layerClass all over again exactly 16864 bytes further in memory from the last ( 0x12e0e0 -> 0x1322c0).

Could anybody clarify why there is a double call or why is there a redundant object at 0x1322c0 of the same class (EAGLView) which invokes the initWithCoder and layerClass all over again? There have been no changes to the OpenGL ES template, only the addition of NSLog for following what's happening.

0

精彩评论

暂无评论...
验证码 换一张
取 消