By +Biscuits Brown · Posted
By Michael Scrip · Posted
By Yonah · Posted
By tvcat · Posted
By Parallax Abstraction · Posted
We rely on ads to keep creating quality content for you to enjoy for free.
Please support our site by disabling your ad blocker.
Continue without supporting us
If the prompt is still appearing, please disable any tools or services you are using that block internet ads (e.g. DNS Servers, tracking protection or privacy extensions).
Question
+Red King Subscriber²
Not allowed,
Also not allowed,
even though T is a struct making it an artificial limitation AFAIK
I have a generic function used by N classes and I want to make it unsafe to get more speed... followed by a few more functions just like it.
I can write one function to take care of 3 scenarios as three structs are 24 bytes and thus interchangeable.
Any better solution though?
One more,
If I am going to use unsafe everywhere, any reason I shouldn't just AllocHGlobal instead of using new T?
Link to comment
https://www.neowin.net/forum/topic/1234943-unsafe-void-dosomethingtt-array-where-t-struct/Share on other sites
14 answers to this question
Recommended Posts