Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

Commit

Permalink
Freeing allocated string in DebugName setter
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrej authored and Andrej committed Feb 15, 2017
1 parent 2d9f8fe commit dd95b73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Source/SharpDX.Direct3D10/DeviceChild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public string DebugName
{
var namePtr = Marshal.StringToHGlobalAnsi(value);
SetPrivateData(CommonGuid.DebugObjectName, value.Length, namePtr);
Marshal.FreeHGlobal(namePtr);
}
}
}
Expand Down
1 change: 1 addition & 0 deletions Source/SharpDX.Direct3D11/DeviceChild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public string DebugName
{
var namePtr = Utilities.StringToHGlobalAnsi(value);
SetPrivateData(CommonGuid.DebugObjectName, value.Length, namePtr);
Marshal.FreeHGlobal(namePtr);
}
}
}
Expand Down

0 comments on commit dd95b73

Please sign in to comment.