unsafe
Retrieving a pixel alpha value for a UIImage (MonoTouch)
This question is a duplicate of 1042830, but MonoTouch-specific. Is there a way th开发者_如何学Cat\'s safer than allocating an IntPtr, drawing into it using CGBitmapContext and then reading bytes at t[详细]
2022-12-25 20:09 分类:问答C# huge size 2-dim arrays
I need to declare square matrices in C# WinForms with more than 20000 items in a row. I read about 2GB .Net object size limit in 32bit and also the same case in 64bit OS.[详细]
2022-12-25 18:37 分类:问答Converting C# void* to byte[]
In C#, I need to write T[] to a stream, ideally without any additional buffers. I have a dynamic code that converts T[] (where T is a no-objects struct) to a void* and fixes it in memory, and that wor[详细]
2022-12-25 18:30 分类:问答AccessViolationException, attempted to read or write protected memory
I\'m using a dll that contains unmanaged code for interacting with specific hardware, and I\'m trying to use it from C#, but I keep getting an AccessViolationException.[详细]
2022-12-25 03:51 分类:问答C# memory management: unsafe keyword and pointers
What are the consequences (positive/negative) of using the unsafe keyword in C# to use pointers? For example, what becomes of garbage collection, what are the performance gains/losses, what are the pe[详细]
2022-12-24 19:56 分类:问答Copy Small Bitmaps on to Large Bitmap with Transparency Blend: What is faster than graphics.DrawImage(smallBitmap, x , y)?
I have identified this call as a bottleneck in a high pressure function. graphics.DrawImage(smallBitmap, x , y);[详细]
2022-12-23 04:52 分类:问答Should I mingle my safe code with my unsafe code?
I\'m working on a project that uses a bunch of WIN32 API ca开发者_StackOverflow社区lls and requires some unsafe code. From a best practices standpoint should I isolate this code in its own DLL compile[详细]
2022-12-21 04:02 分类:问答Why you cannot use an unsafe keyword in an iterator context?
In looking at this question which Jon did a fine job in answering... \'How to read a text file reversly with iter开发者_JAVA技巧ator\'. And there was a similar question in which I answered using point[详细]
2022-12-20 00:34 分类:问答Nested calls can lead to uninitialized arguments in C?
Is len correctly initialized and safe in set_array call? void object_copy (Object* self, Object* obj) {[详细]
2022-12-17 02:08 分类:问答What would happen in an thread unsafe .NET queue object?
I have a .NET queue object. The producer thread do the Enqueue operation, the data enqueued in the queue is a byte[] array, while the other consumer thread do the Dequeue operation on the same queue o[详细]
2022-12-16 14:28 分类:问答