push
github
1199 of 1393 branches covered (86.07%)
Branch coverage included in aggregate %.
6 of 8 new or added lines in 1 file covered. (75.0%)
193 existing lines in 43 files now uncovered.2336 of 2572 relevant lines covered (90.82%)
557295.56 hits per line
| 1 |
namespace DuckDB.NET.Native; |
|
| 2 |
|
|
| 3 |
public class SafeUnmanagedMemoryHandle : SafeHandleZeroOrMinusOneIsInvalid |
|
| 4 |
{
|
|
|
UNCOV
5
|
public SafeUnmanagedMemoryHandle() : base(true) { } |
× |
| 6 |
|
|
| 7 |
public SafeUnmanagedMemoryHandle(IntPtr preexistingHandle) : base(true) |
1,056,090✔ |
| 8 |
{
|
|
| 9 |
SetHandle(preexistingHandle); |
1,056,090✔ |
| 10 |
} |
1,056,090✔ |
| 11 |
|
|
| 12 |
protected override bool ReleaseHandle() |
|
| 13 |
{
|
|
| 14 |
if (handle != IntPtr.Zero)
|
|
| 15 |
{
|
|
| 16 |
Marshal.FreeCoTaskMem(handle); |
1,055,486✔ |
| 17 |
|
|
| 18 |
handle = IntPtr.Zero; |
1,055,486✔ |
| 19 |
|
|
| 20 |
return true; |
1,055,486✔ |
| 21 |
} |
|
| 22 |
|
|
|
UNCOV
23
|
return false; |
× |
| 24 |
} |
|
| 25 |
} |