This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Deallocates the receiver by calling NSDeallocateObject() with self | |
| * as the argument.<br /> | |
| * <p> | |
| * You should normally call the superclass implementation of this method | |
| * when you override it in a subclass, or the memory occupied by your | |
| * object will not be released. | |
| * </p> | |
| * <p> | |
| * <code>NSObject</code>'s implementation of this method |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Decrements the retain count for the receiver if greater than zero, | |
| * otherwise calls the dealloc method instead.<br /> | |
| * The default implementation calls the NSDecrementExtraRefCountWasZero() | |
| * function to test the extra reference count for the receiver (and | |
| * decrement it if non-zero) - if the extra reference count is zero then | |
| * the retain count is one, and the dealloc method is called.<br /> | |
| * In GNUstep, the [NSObject+enableDoubleReleaseCheck:] method may be used | |
| * to turn on checking for ratain/release errors in this method. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Increments the reference count and returns the receiver.<br /> | |
| * The default implementation does this by calling NSIncrementExtraRefCount() | |
| */ | |
| - (id)retain { | |
| #if (GS_WITH_GC == 0) | |
| NSIncrementExtraRefCount(self); | |
| #endif | |
| return self; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define AADD(c, o) GSDebugAllocationAdd(c, o) | |
| static SEL cxx_construct, cxx_destruct; | |
| /** | |
| * Calls the C++ constructors for this object, starting with the ones declared | |
| * in aClass. The compiler generates two methods on Objective-C++ classes that | |
| * static instances of C++ classes as ivars. These are -.cxx_construct and | |
| * -.cxx_destruct. The -.cxx_construct methods must be called in order from | |
| * the root class to all subclasses, to ensure that subclass ivars are | |
| * initialised after superclass ones. This must be done in reverse for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // QuickSort | |
| // | |
| // Created by SeaHub on 2017/3/3. | |
| // Copyright © 2017年 @Seahub. All rights reserved. | |
| // | |
| #include <iostream> | |
| #include <vector> | |
| using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // Singleton | |
| // | |
| // Created by SeaHub on 2017/3/2. | |
| // Copyright © 2017年 @Seahub All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> | |
| @interface Singleton : NSObject <NSCopying, NSMutableCopying> |
NewerOlder