Click here to Skip to main content
15,889,808 members
Home / Discussions / C#
   

C#

 
AnswerRe: String reverse function in c# Pin
DavidNohejl28-Aug-05 8:45
DavidNohejl28-Aug-05 8:45 
AnswerRe: String reverse function in c# Pin
Guffa28-Aug-05 8:45
Guffa28-Aug-05 8:45 
AnswerRe: String reverse function in c# Pin
28-Aug-05 8:47
suss28-Aug-05 8:47 
Questionnetwork problem Pin
snouto28-Aug-05 7:37
snouto28-Aug-05 7:37 
AnswerRe: network problem Pin
Dave Kreskowiak28-Aug-05 9:39
mveDave Kreskowiak28-Aug-05 9:39 
QuestionDetecting mouse clicks Pin
zeihou28-Aug-05 2:59
zeihou28-Aug-05 2:59 
AnswerRe: Detecting mouse clicks Pin
Mohamad Al Husseiny28-Aug-05 3:38
Mohamad Al Husseiny28-Aug-05 3:38 
QuestionShuting down the garbage collector Pin
Gilad Kapelushnik28-Aug-05 1:23
Gilad Kapelushnik28-Aug-05 1:23 
Hello.

While running a C# code I'm running a C method from a pre-compiled dll (LZO decompressor)

On some calls to this method I recive a memory exceptions assumed to be related with the garbge collector. Even using fixed memory pointers in an "unsafe" code section didn't solve the problem (very strange).

while(...){
try{
unsafe{
.
.
.
fixed(byte* Psrc = src, Pdst = dst, Pwrkmem = this._workMemory){
lzo1x_decompress(Psrc, SourceSize, Pdst, &outlen, Pwrkmem);
}
.
.
.
}
}
catch{
.
.
.
}
}

Calling the GC with GC.Collect() before the calling C function gave *less* memory excepetions but didn't solve the problem.

I decided to try to shut down memory managment while executing the C function.

Anybody know how to pause & resume the garbage collector ?

Anybody know how to solve this problem ?

The Exception beening thrown is "Object reference not set to an instance of an object." I assume this is bacause the garbage collector has moved one of the variables.

Gilad.

AnswerRe: Shuting down the garbage collector Pin
Colin Angus Mackay28-Aug-05 4:58
Colin Angus Mackay28-Aug-05 4:58 
GeneralRe: Shuting down the garbage collector Pin
Gilad Kapelushnik28-Aug-05 20:10
Gilad Kapelushnik28-Aug-05 20:10 
AnswerRe: Shuting down the garbage collector Pin
Daniel Turini28-Aug-05 22:44
Daniel Turini28-Aug-05 22:44 
Questionpassword problems Pin
nidhelp28-Aug-05 1:00
nidhelp28-Aug-05 1:00 
AnswerRe: password problems Pin
Mohamad Al Husseiny28-Aug-05 3:14
Mohamad Al Husseiny28-Aug-05 3:14 
GeneralRe: password problems Pin
nidhelp28-Aug-05 4:59
nidhelp28-Aug-05 4:59 
GeneralRe: password problems Pin
nidhelp28-Aug-05 5:25
nidhelp28-Aug-05 5:25 
AnswerRe: password problems Pin
Mohamad Al Husseiny28-Aug-05 3:28
Mohamad Al Husseiny28-Aug-05 3:28 
GeneralRe: password problems Pin
Matt Gerrans28-Aug-05 17:09
Matt Gerrans28-Aug-05 17:09 
Questionwhat is the differences by 'component' and 'windows form'? Pin
Sasuko28-Aug-05 0:47
Sasuko28-Aug-05 0:47 
AnswerRe: what is the differences by 'component' and 'windows form'? Pin
occcy29-Aug-05 3:42
occcy29-Aug-05 3:42 
QuestionProblem with Crystal Reports and Setup Pin
Claudio Grazioli28-Aug-05 0:43
Claudio Grazioli28-Aug-05 0:43 
Questionemergency ned to help(how to store datagrid in array list) Pin
malak nour27-Aug-05 22:54
malak nour27-Aug-05 22:54 
QuestionHow to get address of variable Pin
levgiang27-Aug-05 22:52
levgiang27-Aug-05 22:52 
AnswerRe: How to get address of variable Pin
Dario Solera27-Aug-05 22:53
Dario Solera27-Aug-05 22:53 
AnswerRe: How to get address of variable Pin
Guffa28-Aug-05 0:53
Guffa28-Aug-05 0:53 
GeneralRe: How to get address of variable Pin
leppie28-Aug-05 3:18
leppie28-Aug-05 3:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.