/unsafe switch by itself won't make your application unstable.
It just allows you to add some code which might make your application
unstable if you use it incorrectly.
If you do not use, say, pointers, there's no... hmm... point to use
/unsafe switch.
I'd say if you can compile without /unsafe, you should compile without it.
Best regards,
Ilya
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
[quoted text, click to view] > Date: Mon, 07 Feb 2005 20:10:13 +0100
> From: John Paulsson <et--reeemooowe-ique@hotmail.com>
> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
> X-Accept-Language: en-us, en
> MIME-Version: 1.0
> Subject: /unsafe, any negative side effects?
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 7bit
> Message-ID: <#3m6PhUDFHA.4052@TK2MSFTNGP15.phx.gbl>
> Newsgroups: microsoft.public.dotnet.framework.compactframework
> NNTP-Posting-Host: 193.15.95.2
> Lines: 1
> Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15
.phx.gbl
[quoted text, click to view] > Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.compactframework:70648
> X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
>
> Hi,
> If we assume that the code inside my unsafe blocks are OK and don't do
> anything wrong (like screwing up memory blocks, leeks memory whatever)..
>
> ..can there be any negative side effects when re-compiling my old
> application using the /unsafe compiler switch which may cause bugs? I
> know it shouldn't in theory, just need to make sure my old application
> won't become unstable after a /unsafe recompilation.
>
Hey,
I just added some coded to my app that requires unsafe mode, just wanted
to be sure I don't screw up the rest of the app using the switch. But I
guess I/it should be safe then. Thanks!
[quoted text, click to view] Ilya Tumanov [MS] wrote:
> /unsafe switch by itself won't make your application unstable.
> It just allows you to add some code which might make your application
> unstable if you use it incorrectly.
> If you do not use, say, pointers, there's no... hmm... point to use
> /unsafe switch.
> I'd say if you can compile without /unsafe, you should compile without it.
>
> Best regards,
>
> Ilya
>
> microsoft.public.dotnet.framework.compactframework:70648
>
>>X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
>>
>>Hi,
>>If we assume that the code inside my unsafe blocks are OK and don't do
>>anything wrong (like screwing up memory blocks, leeks memory whatever)..
>>
>>..can there be any negative side effects when re-compiling my old
>>application using the /unsafe compiler switch which may cause bugs? I
>>know it shouldn't in theory, just need to make sure my old application
>>won't become unstable after a /unsafe recompilation.
>>
>
I thought use of the unsafe keyword in C# itself requires the
application to be compiled with /unsafe compiler switch?
[quoted text, click to view] Steve Maillet (eMVP) wrote:
> You can use the unsafe keyword in C# to localize the effect. That would be
> the recommended approach rather than wholesale application with a compiler
> switch.
Don't see what you're looking for? Try a search.