This is a summary and technical discussionsonevcat. Technical point more casual, but still Nike Shoes are more interesting. Technical details covered include: Cache Tagged Pointer objects autorelase object system object, according to Apple's programming conventions, non-alloc, copy the returned objects are autorelease, so for the following code, although variable number is __weak, but because [ NSNumber numberWithInt: 100] returned objects are autorelase, it still can Air Jordans Men's NSLog print out. __weak NSNumber * number = [NSNumber numberWithInt: 100]; NSLog (@ \u0026 quot; number =% @ \u0026 quot ;, number); seen from the assembly code, the above code number when you create a variable, it is carried out by objc_loadWeak methods. According to official documents Clang, objc_loadWeak method will retain and autorelease this object. So give a weak target assignment, it does not immediately released, but will put autorelease pool, a release with autorelease pool. The following is a sample code objc_loadWeak: id objc_loadWeak (id * object) {return objc_autorelease (objc_loadWeakRetained (object));} To test this answer, we have made an interesting example to verify, as follows: __ weak NSNumber * number; autoreleasepool {number = [NSNumber numberWithInt: 100];} NSLog (@ \u0026 quot; number =% @ \u0026 quot ;, number); In the above example, turned out as we expected, number via NSLog when viewing value, becomes a nil. Discussion II: Object Caching NSNumber we do more experiments, we found an interesting phenomenon, and if you put 100 into a 10, the number becomes when NSLog, output values can no longer be nil up. Here's the test code: __ weak NSNumber * number;autoreleasepool {number = [NSNumber numberWithInt: 10];} NSLog (@ \u0026 quot; number =% @ \u0026 quot ;, number); after onevcat experiments are from -1 to 12 It can be output, and other values it will become nil. So we guess is a system object to these common values do caching, so we wrote the following code to validate. The result was so, repeatedly create NSNumber target value of 10, the address is the same. And repeatedly create value NSNumber object 100, every time you create an object address obtained are not the same. NSNumber * number = [NSNumber numberWithInt: 10]; NSNumber 2012 Cheap Nike Air Jordan 1 High Heels For Sale Beige Pink * another = [NSNumber numberWithInt: 10]; NSLog (@ \u0026 quot;% p% p \u0026 quot ;, number, another); number = [NSNumber numberWithInt: 100]; another = [ NSNumber numberWithInt: 100]; NSLog (@ \u0026 quot;% p% p \u0026 quot ;, number, another); discuss three: 64 Systems and Tagged Pointer objects discussed already ended, and the results I am writing this blog, hand cheap and test it, we Nike shoes online found that in Air Jordan 11 64 of the simulator, no matter how many times create, and regardless of how much Air Max for Men the value of an int, NSNumber int object address all of the same value are the same! Puzzled for a few minutes, I suddenly remembered 64 system described cited WWDC put Tagged Pointer, understood why. In WWDC2013 of 'Session 404 Advanced in Objective-C' video, Apple introduced Tagged Pointer. Tagged Pointer exists primarily in order to save memory. We know that the pointer size of the object is generally concerned with the machine word, in 32-bit systems, the size of a pointer is 32 bits (4 bytes), and in the 64-bit system, a pointer size would be 64 ( 8 bytes). In the 64-bit system, if we really use a pointer to store NSNumber instance, Air Jordan 1 we first need an 8-byte pointer, another piece of memory required to store NSNumber instance, it usually is 8 bytes. Such memory overhead is relatively large. Apple for NSNumber and NSDate objects changed with Tagged Pointer to store, in simple terms, Tagged Pointer is a false pointer, its value is no longer another address, and that is the value of the corresponding variable. Tagged Pointer mainly has the following three characteristics: Tagged Pointer designed to store small objects, such 180-159220 Nike LeBron 7 VII Soldier White Black Running Shoes as value NSNumber and NSDateTagged Pointer pointer is the address of a longer, but the real value. So, in fact it is no longer an object, and it's just Lebron James Shoes an ordinary variable object wrapped in leather only! Therefore, it is not stored in the memory heap, you do not need to malloc and free. Has read three times in memory efficiency (previously addressed - \u0026 gt; message - Air Jordan 13 \u0026 gt; to get the value, and now directly get the value), created 106 times faster than before. English documents related theme as follows: the introduction Tagged Nike Shoes Global Pointer but also brought problems, namely Tagged Pointer because not real object, but a pseudo-objects, so if you regard it as an object completely to make, it may be cloven hoof. For example, I 'Objective-C object model and its 2013 Air Jordan 4 (IV) Retro application,' a paper wrote that all objects have isa pointer, Tagged Pointer actually is not, because it is not a real object. Because it is not real object, so if you have direct access Tagged Pointer isa member of words, at compile time will have the following warning: For the above wording should be replaced by a corresponding method calls, such as isKindOfClass and object_getClass, as shown below: So far, all the questions have been resolved, happy ~ In addition there is an introduction here Tagged Pointer article: '64 and Tagged Pointer', it is recommended to everyone. One More Thing If you know the art of asking questions, iOS development has been the entry of at least six months, I will use google, stackoverflow and github to solve basic problems, but Air Jordan 10 there is no place to find someone to discuss some of the more complex problems encountered when, then you Air Jordan 12 are welcome to apply to join me to create The slack groups. This discussion group is made slack in thecaoping students questions arising. iOS development slack groups after two months of Air Max for Women trial operation, now has gathered 300 experienced iOS developers now accepting applications to join, application address (on the wall): https://docs.google.com / forms / d / 1eWH_jjDIIV5kpSV0BUPBAIboHEj0ZrgBrZHWsdJqkDU / viewform. If you are not over the wall, you do not use google and stackoverflow and github, then I advise you not to join. Whenon weak object releases