code/WPILib/Resource.cpp
/**
 * Free an allocated resource.
 * After a resource is no longer needed, for example a destructor is called for a channel assignment
 * class, Free will release the resource value so it can be reused somewhere else in the program.
 */
Free an allocated resource.
After a resource is no longer needed, for example a destructor is called for a channel assignment
class, Free will release the resource value so it can be reused somewhere else in the program.
Free an allocated resource . After a resource is no longer needed for example a destructor is called for a channel assignment class Free will release the resource value so it can be reused somewhere else in the program .
void Resource::Free(UINT32 index)
{
	if (index >= m_size)
	{
		wpi_fatal(IndexOutOfRange);
		return;
	}
	if (!m_isAllocated[index])
	{
		wpi_fatal(NotAllocated);
		return;
	}
	m_isAllocated[index] = false;
}
void Resource :: Free ( UINT32 index ) { if ( index >= m_size ) { wpi_fatal ( IndexOutOfRange ) ; return ; } if ( ! m_isAllocated [ index ] ) { wpi_fatal ( NotAllocated ) ; return ; } m_isAllocated [ index ] = false ; }
Free an allocated resource.
Free an allocated resource .