mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
more threading fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23448 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bdf6b69bce
commit
3f65c97d1a
3 changed files with 39 additions and 3 deletions
|
@ -1428,6 +1428,19 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (void) release
|
||||
{
|
||||
/* We lock during release so that other threads can't grab the
|
||||
* object between us checking the reference count and deallocating.
|
||||
*/
|
||||
[load_lock lock];
|
||||
if (NSDecrementExtraRefCountWasZero(self))
|
||||
{
|
||||
[self dealloc];
|
||||
}
|
||||
[load_lock unlock];
|
||||
}
|
||||
|
||||
/* This method is the backbone of the resource searching for NSBundle. It
|
||||
constructs an array of paths, where each path is a possible location
|
||||
for a resource in the bundle. The current algorithm for searching goes:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue