CefV8ArrayBufferReleaseCallback.cs 900 B

12345678910111213141516171819202122232425262728
  1. namespace Xilium.CefGlue
  2. {
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Diagnostics;
  6. using System.Runtime.InteropServices;
  7. using Xilium.CefGlue.Interop;
  8. /// <summary>
  9. /// Callback interface that is passed to CefV8Value::CreateArrayBuffer.
  10. /// </summary>
  11. public abstract unsafe partial class CefV8ArrayBufferReleaseCallback
  12. {
  13. private void release_buffer(cef_v8array_buffer_release_callback_t* self, void* buffer)
  14. {
  15. CheckSelf(self);
  16. ReleaseBuffer((IntPtr)buffer);
  17. }
  18. /// <summary>
  19. /// Called to release |buffer| when the ArrayBuffer JS object is garbage
  20. /// collected. |buffer| is the value that was passed to CreateArrayBuffer along
  21. /// with this object.
  22. /// </summary>
  23. protected abstract void ReleaseBuffer(IntPtr buffer);
  24. }
  25. }