Re: change font size?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Steg <Steg@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Hi, my DX10 program works fine when, on initialisation, I create a font as
follows:
...
Maybe the problem lies with SafeRelease because if it is omitted the crash
is not immediate but eventually occurs (I think due to repeat calls on
D3DX10CreateFont). SafeRelease is:

template <class T>
inline void SafeRelease( T& iface )
{
if( iface )
{
iface->Release();
iface = NULL;
}
}

Why reinvent the wheel here, instead of using CComPtr or _com_ptr_t?
--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
.