Projects > cpp > Issues > Feature #396

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

remove ccxScopedPtr & ccxScopedArray

Feature #396 [Closed] 2011-03-14 20:57 . Updated almost 12 years ago

Vote for this argument. ( You must login to see this poll. )

In my opinion, I DO believe ccxScopedPtr & ccxScopedArray in CCCommon.h is OVER-DESIGNED
For 2 reasons:
* Some developers opposed our implementation of NSAutoreleasePool. Take a look at the commends below How close is coco2dx to being on par with cocos2d? topic.

That makes sense from a porting perspective. However, when writing new cocos2dx apps, I’d love to get away from the whole retain/release/autorelease stuff. … I think it would be nice if Cocos2dx did not force a specific memory system, property system, or usage pattern on the user, especially one which is not native or regularly used in C/C++ code. There are significant speed advantages to not using these systems, for instance, and in some cases a user might already have one they prefer.

  • Stay foolish, Jobs saied. We’re not more clever than the guys writing STL. std::smart_pointer is not good enough, seldom people use it. So how can we write a better one? Leave this thing to the game developers theirselves, don’t design one more new memory management system in our engine.

So, plz remove ccxScopedPtr & ccxScopedArray, and replace the code in CCImage. 2011-03-14 20:58
  • Tracker changed from Bug to Feature 2011-03-15 07:55
  • Category set to 5 2011-03-23 07:33
  • Target version changed from cocos2d-0.99.5-x-0.8.3 to cocos2d-0.99.5-x-0.8.2
yangws 2011-03-27 18:45
  • Status changed from New to In Progress
yangws 2011-03-28 07:27
  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset commit:e20f2377ffad62210fa31e859cb2af9c2523a149. 2011-03-28 07:42
  • Status changed from Resolved to Closed 2012-05-25 08:15
  • Project changed from cocos2d-x to cpp
  • Category deleted (5)
  • Target version deleted (cocos2d-0.99.5-x-0.8.2)

Atom PDF

Start date:2011-03-14
Due date:
% Done:


Target version:-