vb.net - Font dispose - How to: Implement the Dispose Finalize Pattern (Visual Basic) -


first thing program use 3 5 fonts , when create pdf.

i think there's no need dispose fonts objects point of view of resources learning , create habit good.

i try do

if myfont1 isnot nothing     myfont1.dispose() end if 

or

if myfont1 isnot nothing     myfont1.idisposable.dispose() end if 

and "dispose or idisposable not member of font"

to implement dispose option need work?

https://msdn.microsoft.com/en-us/library/s9bwddyx(v=vs.90).aspx

your code should suggested:

if myfont1 isnot nothing     myfont1.dispose() end if 

since font type implement idisposable interface explained here.


Comments

Popular posts from this blog

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - SSE Emitter : Manage timeouts and complete() -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -