Changeset 52598 in vbox for trunk/src/VBox/HostServices/SharedOpenGL
- Timestamp:
- Sep 4, 2014 5:24:21 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m
r52560 r52598 369 369 - (id)initWithObject:(id)aObject selector:(SEL)aSelector arg:(id)aArg 370 370 { 371 [aObject retain]; 372 m_Object = aObject; 373 m_Selector = aSelector; 374 if (aArg != nil) 375 [aArg retain]; 376 m_Arg = aArg; 377 371 self = [super init]; 372 373 if (self) 374 { 375 [aObject retain]; 376 m_Object = aObject; 377 m_Selector = aSelector; 378 if (aArg != nil) 379 [aArg retain]; 380 m_Arg = aArg; 381 } 382 378 383 return self; 379 384 } … … 389 394 if (m_Arg != nil) 390 395 [m_Arg release]; 396 397 [super dealloc]; 391 398 } 392 399 @end … … 395 402 - (id)init 396 403 { 397 int rc = RTCritSectInit(&m_Lock); 398 if (!RT_SUCCESS(rc)) 399 { 400 DEBUG_WARN(("RTCritSectInit failed %d\n", rc)); 401 return nil; 402 } 403 404 m_CurIndex = 0; 405 406 m_pArray = [[NSMutableArray alloc] init]; 404 self = [super init]; 405 406 if (self) 407 { 408 int rc = RTCritSectInit(&m_Lock); 409 if (!RT_SUCCESS(rc)) 410 { 411 DEBUG_WARN(("RTCritSectInit failed %d\n", rc)); 412 return nil; 413 } 414 415 m_CurIndex = 0; 416 417 m_pArray = [[NSMutableArray alloc] init]; 418 } 419 407 420 return self; 408 421 } … … 410 423 - (void)add:(VBoxTask*)pTask 411 424 { 412 [pTask retain];413 425 int rc = RTCritSectEnter(&m_Lock); 414 426 if (RT_SUCCESS(rc)) … … 477 489 [m_pArray release]; 478 490 RTCritSectDelete(&m_Lock); 491 492 [super dealloc]; 479 493 } 480 494 @end … … 548 562 VBoxTaskPerformSelector *pSelTask = [[VBoxTaskPerformSelector alloc] initWithObject:aObject selector:aSelector arg:aArg]; 549 563 [self add:pSelTask]; 550 [pSelTask release];551 564 } 552 565 … … 590 603 { 591 604 [m_pTasks release]; 605 [super dealloc]; 592 606 } 593 607
Note:
See TracChangeset
for help on using the changeset viewer.