Formato
C#
Post date
2016-10-20 12:00
Publication Period
Unlimited
  1. /// <summary>
  2. /// SharpDX.IUnknown の拡張メソッド。
  3. /// </summary>
  4. public static class SharpDXIUnknownExtensions
  5. {
  6. public static int GetRefferenceCount( this SharpDX.IUnknown unknownObject )
  7. {
  8. try
  9. {
  10. unknownObject.AddReference();
  11. }
  12. catch( InvalidOperationException )
  13. {
  14. // すでに Dispose されている。
  15. return 0;
  16. }
  17. return unknownObject.Release();
  18. }
  19. }
Descargar Printable view

URL of this paste

Embed with JavaScript

Embed with iframe

Raw text