You're leaking here... GetWarningIcon() returns a nux::BaseTexture that has not been unreffed, so when passing it to IconTexture, it gets reffed and its reference count is 2 instead of being just 1. So it won't ever destructed.
Solutions: (1) use the LazyLoader for that as well, (2) manually unref it when returning. PreviewStyle's textures are intended to be used as they are, I think it's better to keep the same assumptions.
Also, if the texture is already 22x22 you don't really need to GetPaymentWarningWidth()/GetPaymentWarningHeight(); IconTexture will guess it for you.
19 + glib::Variant data(g_ variant_ lookup_ value(preview_ data, _label" , G_VARIANT_ TYPE_ANY) );
20 + "no_credentials
Not blocking, but shouldn't be G_VARIANT_ TYPE_STRING, instead of ANY?
99 + warning_texture_ = new IconTexture( style.GetWarnin gIcon() , style.GetPaymen tWarningWidth( ), tWarningHeight( ));
100 + style.GetPaymen
180 +nux::BaseTexture* Style:: GetWarningIcon( ) ure2DFromFile( /warning_ icon.png" , -1, true);
181 +{
182 + return nux::CreateText
183 + PKGDATADIR"
184 +}
You're leaking here... GetWarningIcon() returns a nux::BaseTexture that has not been unreffed, so when passing it to IconTexture, it gets reffed and its reference count is 2 instead of being just 1. So it won't ever destructed.
Solutions: (1) use the LazyLoader for that as well, (2) manually unref it when returning. PreviewStyle's textures are intended to be used as they are, I think it's better to keep the same assumptions.
Also, if the texture is already 22x22 you don't really need to GetPaymentWarni ngWidth( )/GetPaymentWar ningHeight( ); IconTexture will guess it for you.