Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/irov/Mengine
Browse files Browse the repository at this point in the history
  • Loading branch information
irov committed Aug 29, 2023
2 parents 8067721 + a1a9bfe commit 87fc4cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 32 deletions.
20 changes: 4 additions & 16 deletions src/Environment/Apple/ConstStringHolderNSString.mm
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,13 @@
//////////////////////////////////////////////////////////////////////////
ConstStringHolderNSString::~ConstStringHolderNSString()
{
if( m_value != nil )
{
[m_value release];
m_value = nil;
}
m_value = nil;
}
//////////////////////////////////////////////////////////////////////////
void ConstStringHolderNSString::setNSString( const NSString * _value )
{
if( m_value != nil )
{
[m_value release];
m_value = nil;
}

m_value = _value;

if( m_value != nil )
if( _value != nil )
{
[m_value retain];

const char * data = [m_value UTF8String];
size_t size = MENGINE_STRLEN( data );
int64_t hash = Helper::makeHash( data, size );
Expand All @@ -44,6 +30,8 @@
{
this->setup( "", 0, 0 );
}

m_value = _value;
}
//////////////////////////////////////////////////////////////////////////
}
6 changes: 1 addition & 5 deletions src/Plugins/AppleGameCenterPlugin/AppleGameCenterService.mm
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@
{
m_provider = nullptr;

if( m_gameCenterDelegate != nil )
{
[m_gameCenterDelegate release];
m_gameCenterDelegate = nil;
}
m_gameCenterDelegate = nil;
}
//////////////////////////////////////////////////////////////////////////
void AppleGameCenterService::setProvider( const AppleGameCenterProviderInterfacePtr & _provider )
Expand Down
13 changes: 2 additions & 11 deletions src/Plugins/AppleMARSDKPlugin/AppleMARSDKService.mm
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,8 @@
{
[[MARSDK sharedInstance] setDelegate:nil];

if( m_delegate != nil )
{
[m_delegate release];
m_delegate = nil;
}

if( m_adRewardedDelegate != nil )
{
[m_adRewardedDelegate release];
m_adRewardedDelegate = nil;
}
m_delegate = nil;
m_adRewardedDelegate = nil;
}
//////////////////////////////////////////////////////////////////////
void AppleMARSDKService::setProvider( const AppleMARSDKProviderInterfacePtr & _provider )
Expand Down

0 comments on commit 87fc4cc

Please sign in to comment.