当前位置: 首页>>代码示例>>C++>>正文


C++ DISPOSE函数代码示例

本文整理汇总了C++中DISPOSE函数的典型用法代码示例。如果您正苦于以下问题:C++ DISPOSE函数的具体用法?C++ DISPOSE怎么用?C++ DISPOSE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了DISPOSE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DISPOSE

//---------------------------------------------------------------------------//
// LiberaVars
//
//---------------------------------------------------------------------------//
void CCamara3D::LiberaVars()
{
  DISPOSE(m_pPathSrc);
  DISPOSE(m_pPathTgt);
  DISPOSE(m_pPathUp );
  DISPOSE(m_pPathFov);
}
开发者ID:EQ4,项目名称:neonv2,代码行数:11,代码来源:GECamara3D.cpp

示例2: DISPOSE

//---------------------------------------------------------------------------//
// Load
//
//---------------------------------------------------------------------------//  
void CLink::Load(CNodeFile::CNode *pNode)
{
  DISPOSE(m_Device);
  DISPOSE(m_Behaviour);
  // Load Device
  switch (pNode->AttrAsInt("dev"))
  {
    case CLinkDevice::KEYBOARD:    m_Device = NEW CLinkDevice_Keyboard(); break;
    case CLinkDevice::BEAT:        m_Device = NEW CLinkDevice_Beat    (); break;
    case CLinkDevice::TIMER:       m_Device = NEW CLinkDevice_Beat    (); break;
    case CLinkDevice::WAVE:        m_Device = NEW CLinkDevice_Beat    (); break;
    case CLinkDevice::MIDI_NOTE:   m_Device = NEW CLinkDevice_Beat    (); break;
    case CLinkDevice::MIDI_SLIDER: m_Device = NEW CLinkDevice_Beat    (); break;
    case CLinkDevice::MIDI_CLOCK:  m_Device = NEW CLinkDevice_Beat    (); break;
  }
  if (m_Device)
    m_Device->Load(pNode);
  // Load Behaviour
  switch (pNode->AttrAsInt("beh"))
  {
    case CLinkBehaviour::CHECK_BOX: m_Behaviour = NEW CLinkBehaviour_CheckBox(0, false);   break;
    case CLinkBehaviour::COMBO_BOX: m_Behaviour = NEW CLinkBehaviour_ComboBox(0, 0, 0, 0); break;
    case CLinkBehaviour::TRACK_BAR: m_Behaviour = NEW CLinkBehaviour_TrackBar(0, 0);       break;
  }
  if (m_Behaviour)
    m_Behaviour->Load(pNode);
}
开发者ID:EQ4,项目名称:neonv2,代码行数:31,代码来源:Link.cpp

示例3: NWStreamVideo

//********************************************************************
//
//********************************************************************
//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
bool GraphSourceRandom::createStreams()
{
    bool bOK = true;

    if ( bOK )
    {
        mStreamVideo = NEW NWStreamVideo();
        bOK = mStreamVideo->init();
        if ( bOK )
            mStreamGroupOutput->addStream(mStreamVideo);
        else
            DISPOSE(mStreamVideo);
    }

    if ( bOK )
    {
        mStreamAudio = NEW NWStreamAudio();
        bOK = mStreamAudio->init();
        if ( bOK )
            mStreamGroupOutput->addStream(mStreamAudio);
        else
            DISPOSE(mStreamAudio);
    }

    if ( bOK )
    {
        sendStreamProperties();
    }

    return bOK;
}
开发者ID:zhanjx1314,项目名称:nwframework,代码行数:37,代码来源:GraphSourceRandom.cpp

示例4: compressStart

bool compressStart( DESCRIPTOR_DATA * d )
{
   z_stream *s;

   if( d->mccp->out_compress )
      return TRUE;

   CREATE( s, z_stream, 1 );
   CREATE( d->mccp->out_compress_buf, unsigned char, COMPRESS_BUF_SIZE );

   s->next_in = NULL;
   s->avail_in = 0;

   s->next_out = d->mccp->out_compress_buf;
   s->avail_out = COMPRESS_BUF_SIZE;

   s->zalloc = Z_NULL;
   s->zfree = Z_NULL;
   s->opaque = NULL;

   if( deflateInit( s, 9 ) != Z_OK )
   {
      DISPOSE( d->mccp->out_compress_buf );
      DISPOSE( s );
      return FALSE;
   }

   write_to_descriptor( d, (const char *)start_compress2_str, 0 );

   d->can_compress = TRUE;
   d->mccp->out_compress = s;

   return TRUE;
}
开发者ID:m241dan,项目名称:swrproject,代码行数:34,代码来源:mccp.c

示例5: clear_news

void clear_news( bool sMatch, int nCount )
{
    int                     nCurrent = 1;
    NEWS_DATA              *news;

    if ( sMatch == FALSE ) {
        while ( ( news = first_news ) != NULL ) {
            STRFREE( news->data );
            UNLINK( news, first_news, last_news, next, prev );
            DISPOSE( news );
        }
    }
    else {
        for ( news = first_news; news != NULL; news = news->next ) {
            if ( nCount == nCurrent ) {
                STRFREE( news->data );
                UNLINK( news, first_news, last_news, next, prev );
                DISPOSE( news );
                break;
            }
            else
                nCurrent++;
        }
    }
}
开发者ID:jpavonabian,项目名称:6Dragones,代码行数:25,代码来源:news.c

示例6: free_ban

void free_ban( BAN_DATA * pban )
{
    DISPOSE( pban->name );
    DISPOSE( pban->ban_time );
    STRFREE( pban->note );
    DISPOSE( pban->ban_by );
    DISPOSE( pban );
}
开发者ID:dhasenan,项目名称:SmaugFUSS,代码行数:8,代码来源:ban.c

示例7: free_holiday

void free_holiday( HOLIDAY_DATA * day )
{
   UNLINK( day, first_holiday, last_holiday, next, prev );
   DISPOSE( day->announce );
   DISPOSE( day->name );
   DISPOSE( day );
   return;
}
开发者ID:InfiniteAxis,项目名称:SmaugFUSS,代码行数:8,代码来源:calendar.c

示例8: DISPOSE

/*
==================
Free Indielib managers
==================
*/
void CIndieLib::end() {
	
    // ----- Freeing objects -----

	_math                ->end();
	//_meshManager           ->end();
	_input               ->end();
	_entity2dManager     ->end();
	//_entity3dManager       ->end();
	_fontManager         ->end();
	_animationManager    ->end();
	_surfaceManager      ->end();
	_imageManager        ->end();
	//_lightManager      ->end();
	_render              ->end();

	DISPOSE(_math);
	//DISPOSE(_meshManager);
	DISPOSE(_input);
	DISPOSE(_entity2dManager);
	//DISPOSE(_entity3dManager);
	DISPOSE(_fontManager);
	DISPOSE(_animationManager);
	DISPOSE(_surfaceManager);
    DISPOSE(_imageManager);
	//DISPOSE(_lightManager);
	DISPOSE(_render);

	IndieLib::end();

    DISPOSE(_pinstance);
}
开发者ID:AntonioModer,项目名称:indielib-crossplatform,代码行数:37,代码来源:CIndieLib.cpp

示例9: STL_End

PUBLIC void STL_End(STL_PStringList l) {
    STL_PNode p, q;

    assert(l != NULL);
    for (p = l->first; p != NULL; p = q) {
        q = p->next;
        DISPOSE(p);
    }
    DISPOSE(l->first);
    l->nstr = 0;
}
开发者ID:TheJare,项目名称:SpeedHasteSrc,代码行数:11,代码来源:strlist.c

示例10: free_synonym

/*
 * Libera dalla memoria un sinonimo
 */
void free_synonym( SYNO_DATA *synonym )
{
	if ( !synonym )
	{
		send_log( NULL, LOG_BUG, "free_synonym: synonym passato è NULL" );
		return;
	}

	DISPOSE( synonym->syn );
	DISPOSE( synonym );
}
开发者ID:Onirik79,项目名称:bardmud,代码行数:14,代码来源:fread.c

示例11: MAPfree

/*
**  Free the map.
*/
void
MAPfree()
{
    register PAIR	*mp;

    for (mp = MAPdata; mp < MAPend; mp++) {
	DISPOSE(mp->Key);
	DISPOSE(mp->Value);
    }
    DISPOSE(MAPdata);
    MAPdata = NULL;
}
开发者ID:unusual-thoughts,项目名称:freebsd-1.x-ports,代码行数:15,代码来源:map.c

示例12: free_all_specfuns

/*
 * Libera dalla memoria tutti le procedure speciali
 */
void free_all_specfuns( void )
{
	SPECFUN_DATA *specfun;

	for ( specfun = first_specfun;  specfun;  specfun = first_specfun )
	{
		UNLINK( specfun, first_specfun, last_specfun, next, prev );
		top_specfun--;

		DISPOSE( specfun->name );
		DISPOSE( specfun );
	}
}
开发者ID:Onirik79,项目名称:bardmud,代码行数:16,代码来源:special.c

示例13: DISPOSE

//---------------------------------------------------------------------------//
// Destructor
//
//---------------------------------------------------------------------------//  
CMGEffect::~CMGEffect()
{
  g_pAppMain->VJController()->FXUnload(m_ID);
  if (m_ActiveScopePanel)
    m_ActiveScopePanel->SetParent (NULL);
  for (unsigned i = 0; i < m_VJScopeVars.size(); i++)
  {
    for (unsigned j = 0; j < m_VJScopeVars[i].size(); j++)
      DISPOSE(m_VJScopeVars[i][j]);
  }
  DISPOSE(m_Bitmap);
  g_pAppMain->ShowEffect(NULL);
  CMGControl::~CMGControl();
}
开发者ID:EQ4,项目名称:neonv2,代码行数:18,代码来源:MGEffect.cpp

示例14: DISPOSE

//---------------------------------------------------------------------------//
// Init
//
//---------------------------------------------------------------------------//
bool CFXAviVideo::Init(const string &sFile)
{
  m_bOk = true;
  if (sFile != "")
  {
    m_pAvi = NEW CAviDecoder;
    if (m_pAvi->Init(sFile.c_str(), m_Bpp))
    {
      // Overload target settings
      if (m_Bpp == 32)
        m_iTextura = g_pGestorMateriales->AddTextura(m_pAvi->GetWidth(), m_pAvi->GetHeight(), HARD_TEX_FORMAT_A8R8G8B8);
      else
        m_iTextura = g_pGestorMateriales->AddTextura(m_pAvi->GetWidth(), m_pAvi->GetHeight(), HARD_TEX_FORMAT_A1R5G5B5);
      if (m_iTextura < 0)
      {
        DISPOSE(m_pAvi);
        GLOG(("ERR: Can't initialize source texture for AVI file %s\n", sFile.c_str()));
        m_bOk = false;
      }
    }
    else
    {
      DISPOSE(m_pAvi);
      GLOG(("ERR: Can't initialize AVI file %s\n", sFile.c_str()));
      m_bOk = false;
    }
  }
  else
  {
    GLOG(("ERR: FXFile not specified for an FXAviVideo instance\n"));
    m_bOk = false;
  }

  // Save length
  if (IsOk())
  {
    m_fLength = m_pAvi->Length();
    m_fStart  = 0.f;
    m_fEnd    = 1.f;
    m_fCropL  = 0.f;
    m_fCropR  = 1.f;
    m_fCropT  = 0.f;
    m_fCropB  = 1.f;
    m_Color   = HARD_COLOR_ARGB(255,255,255,255);
    m_bInvert = false;
  }

  return (IsOk());
}
开发者ID:EQ4,项目名称:neonv2,代码行数:53,代码来源:FXAviVideo.cpp

示例15: writeMessage

/**
 * This function returns 1 (true) if the 3d Mesh object passed as parameter exists and is
 * deleted from the manager successfully.
 * @param pMe			Pointer to an 3d Mesh object.
 */
bool IND_3dMeshManager::remove(IND_3dMesh *pMe) {
	g_debug->header("Freeing 3d Mesh", 5);

	if (!_ok || !pMe) {
		writeMessage();
		return 0;
	}

	// Search object
	bool mIs = 0;
	list <IND_3dMesh *>::iterator _listIter;
	for (_listIter  = _list3dMesh->begin();
	        _listIter != _list3dMesh->end();
	        _listIter++) {
		if ((*_listIter) == pMe) {
			mIs = 1;
			break;
		}
	}

	// Not found
	if (!mIs) {
		writeMessage();
		return 0;
	}

	// ----- Free object -----

	g_debug->header("Freeing 3d mesh:", 3);
	g_debug->dataChar(pMe->GetMeshName(), 1);

	// Quit from list
	delFromlist(pMe);

	// Free mesh
	if (pMe->_3dMesh._animController) {
		pMe->_3dMesh._animController->Release();
		pMe->_3dMesh._animController = 0;
	}

	// free hierarchy
	if (pMe->_3dMesh._frameRoot) {
		// Create a mesh heirarchy class to control the removal of memory for the frame heirarchy
		XMeshHierarchy memoryAllocator;
		D3DXFrameDestroy(pMe->_3dMesh._frameRoot, &memoryAllocator);
		pMe->_3dMesh._frameRoot = 0;
	}

	// Free bones
	if (pMe->_3dMesh._boneMatrices) {
		DISPOSEARRAY(pMe->_3dMesh._boneMatrices);
	}

	// Free the pointer
	DISPOSE(pMe);

	g_debug->header("Ok", 6);

	return 1;
}
开发者ID:AntonioModer,项目名称:indielib-crossplatform,代码行数:65,代码来源:IND_3dMeshManager.cpp


注:本文中的DISPOSE函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。