mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
where alloctype(T) : delete fix
This commit is contained in:
parent
ff98747c4b
commit
4884bef9d2
2 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ namespace LibA
|
|||
val.Dispose();
|
||||
}
|
||||
|
||||
public static void Alloc<T>() where T : new, delete
|
||||
public static void Alloc<T>() where T : new where alloctype(T) : delete
|
||||
{
|
||||
let t = new T();
|
||||
delete t;
|
||||
|
|
|
@ -168,7 +168,7 @@ namespace Tests
|
|||
}
|
||||
}
|
||||
|
||||
public static void Alloc0<T>() where T : new, delete, IDisposable
|
||||
public static void Alloc0<T>() where T : new, IDisposable where alloctype(T) : delete
|
||||
{
|
||||
alloctype(T) val = new T();
|
||||
val.Dispose();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue