DocumentViewer: Trigger GC on done
This commit is contained in:
parent
8328fb27dc
commit
350ee79274
@ -69,8 +69,14 @@ Public Class DocumentViewer
|
|||||||
''' Terminate Viewer, freeing up resources and deleting temp files
|
''' Terminate Viewer, freeing up resources and deleting temp files
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Sub Done()
|
Public Sub Done()
|
||||||
|
_logger.Debug("Done: Deleting Temp Files")
|
||||||
DeleteTempFiles()
|
DeleteTempFiles()
|
||||||
|
|
||||||
|
_logger.Debug("Done: Closing Documents")
|
||||||
FreeFile()
|
FreeFile()
|
||||||
|
|
||||||
|
_logger.Debug("Done: Triggering GC")
|
||||||
|
GC.Collect()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
@ -150,7 +156,7 @@ Public Class DocumentViewer
|
|||||||
|
|
||||||
Private Sub FreeFile()
|
Private Sub FreeFile()
|
||||||
Try
|
Try
|
||||||
If Len(_FilePath) OrElse _Fileinfo Is Nothing Then
|
If Len(_FilePath) = 0 OrElse _Fileinfo Is Nothing Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Dim oExtension As String = _Fileinfo.Extension.ToUpper
|
Dim oExtension As String = _Fileinfo.Extension.ToUpper
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user