其實不只這件,Chrome在某些HTML的呈現與layout效果,似乎也不是很正確,反而是Safari真的是比較正確一點,也比較沒有問題...要不是Safari的memory usage比較大,而且
這真的是一大諷刺啊...Google...
+ (id) sharedInstance;然後,在對應的.m檔案中,添加下列內容:
static MyManager *instance = nil;@implementation MyManager#pragma mark Singleton Methods+ (id)sharedInstance {@synchronized(self) {if(sharedMyManager == nil)sharedMyManager = [[super allocWithZone:NULL] init];}return sharedMyManager;}+ (id)allocWithZone:(NSZone *)zone {return [[self sharedManager] retain];}- (id)copyWithZone:(NSZone *)zone {return self;}- (id)retain {return self;}- (unsigned)retainCount {return UINT_MAX; //denotes an object that cannot be released}- (void)release {// never release}- (id)autorelease {return self;}- (id)init {if (self = [super init]) {// initialize your instance variables}return self;}- (void)dealloc {// Should never be called, but just here for clarity really.// release your instance variables[super dealloc];}@end
sudo apt-get install x-window-system-core gnome-core