Пример #1
0
    void SoundDelete(g_id sound)
    {
        std::map<g_id, Sound*>::iterator iter = sounds_.find(sound);
        if (iter == sounds_.end())
            return;

        Sound *sound2 = iter->second;

        std::set<Channel*>::iterator iter2, e = sound2->channels.end();
        for (iter2 = sound2->channels.begin(); iter2 != e; ++iter2)
        {
            Channel *channel = *iter2;

            if (channel->source != 0)
            {
                alSourceStop(channel->source);
                alDeleteSources(1, &channel->source);
            }

            channels_.erase(channel->gid);

            gevent_RemoveEventsWithGid(channel->gid);

            delete channel;
        }

        alDeleteBuffers(1, &sound2->buffer);

        delete sound2;

        sounds_.erase(iter);
    }
Пример #2
0
	~GMEDIA()
	{
		JNIEnv *env = g_getJNIEnv();
		env->CallStaticVoidMethod(cls_, env->GetStaticMethodID(cls_, "cleanup", "()V"));
		
		env->DeleteGlobalRef(cls_);
		
		gevent_RemoveEventsWithGid(gid_);
	}
Пример #3
0
void UIManager::deleteWidget(g_id gid)
{
    std::map<g_id, Widget*>::iterator iter = map_.find(gid);

    if (iter == map_.end())
        throw std::runtime_error("invalid gid");

    gevent_RemoveEventsWithGid(gid);

    delete iter->second;
    map_.erase(iter);
}
Пример #4
0
GHID::~GHID()
{
    gevent_RemoveCallback(onEnterFrame, this);
    Gamepad_shutdown();
    std::map<int, GController*>::iterator iter, e = players.end();
    for (iter = players.begin(); iter != e; ++iter)
    {
        delete iter->second;
    }
    players.clear();
    gevent_RemoveEventsWithGid(gid_);
}
	~GNotification()
	{
		JNIEnv *env = g_getJNIEnv();
		
		env->CallStaticVoidMethod(cls_, env->GetStaticMethodID(cls_, "destruct", "()V"));
		
		env->DeleteGlobalRef(cls_);
		env->DeleteGlobalRef(clsBundle);
		env->DeleteGlobalRef(clsSparse);
		
		gevent_RemoveEventsWithGid(gid_);
		gapplication_removeCallback(onAppStart, this);
	}
Пример #6
0
void HTTPManager::Close(g_id id)
{
    std::map<QNetworkReply*, NetworkReply>::iterator iter = map_.begin(), e = map_.end();
    for (; iter != e; ++iter)
    {
        if (iter->second.id == id)
        {
            iter->first->deleteLater();
            map_.erase(iter);
            break;
        }
    }

    gevent_RemoveEventsWithGid(id);
}
Пример #7
0
    void ChannelStop(g_id channel)
    {
        std::map<g_id, Channel*>::iterator iter = channels_.find(channel);
        if (iter == channels_.end())
            return;

        Channel *channel2 = iter->second;

        if (channel2->source != 0)
        {
            alSourceStop(channel2->source);
            alDeleteSources(1, &channel2->source);
        }

        channel2->sound->channels.erase(channel2);

        gevent_RemoveEventsWithGid(channel2->gid);

        delete channel2;

        channels_.erase(iter);
    }
Пример #8
0
 ~GGApplicationManager()
 {
     gevent_RemoveEventsWithGid(gid_);
 }
Пример #9
0
	~GMEDIA()
	{

		gevent_RemoveEventsWithGid(gid_);
    }
Пример #10
0
void ggeolocation_cleanup()
{
	ggeolocation_stopUpdatingLocation();
	gevent_RemoveEventsWithGid(gid_);
}
Пример #11
0
	~GAds()
	{
		frameworks.clear();
		gevent_RemoveEventsWithGid(gid_);
	}