Click here to Skip to main content
16,012,468 members
Home / Discussions / C#
   

C#

 
GeneralRe: const int problem...! Pin
Roger Alsing13-Nov-04 3:33
Roger Alsing13-Nov-04 3:33 
GeneralRe: const int problem...! Pin
Colin Angus Mackay13-Nov-04 3:38
Colin Angus Mackay13-Nov-04 3:38 
GeneralRe: const int problem...! Pin
Skynyrd13-Nov-04 4:44
Skynyrd13-Nov-04 4:44 
GeneralRe: const int problem...! Pin
Kofi Nimoh13-Nov-04 4:33
Kofi Nimoh13-Nov-04 4:33 
GeneralRe: const int problem...! Pin
Skynyrd13-Nov-04 4:58
Skynyrd13-Nov-04 4:58 
GeneralRe: const int problem...! Pin
Kofi Nimoh13-Nov-04 5:03
Kofi Nimoh13-Nov-04 5:03 
GeneralRe: const int problem...! Pin
Skynyrd13-Nov-04 5:19
Skynyrd13-Nov-04 5:19 
GeneralServer keeps client objects alive! Pin
Judah Gabriel Himango12-Nov-04 8:32
sponsorJudah Gabriel Himango12-Nov-04 8:32 
This is a really odd problem I just discovered with our thin client app.

We have a client/server solution that utilizes .NET remoting. Basically, the client will occassionally ask for data from the server, the server will read data from a database and return it to the client. All that works well:

// on the client, ask the server for some big data
Blob[] serverObj.GetBigBlobs(); // where serverObj is a MarshalByRefObject published on the server

// on the server, handle the client request
public Blob[] GetBigBlobs()
{
   return new Blob[] {...};
}


Pretty simple example. But what I soon discovered is that when the client calls the GetBigBlobs method, the server memory shoots up (expected) but never releases the memory until the client is disconnected (unexpected), even if I force a garbage collection using GC.Collect().

So my question is, why is the server memory not being released right away? The server method creates and returns the huge Blob[], but never uses it again nor references it; so why is the garbage collector hanging onto it? The only thing that pops into my head is that the server does hold a reference to an MarshalByRefObject published by the client, but nothing else -- that shouldn't cause problems right?

Any remotely useful information on my blog will be removed immediately.

There are 10 kinds of people in the world. Those who have heard of the ubiquitous, overused, worn-out-like-an-old-shoe binary "joke" and those who haven't.
Judah Himango


Generalcall card telephony solution! Pin
manasrahfantom12-Nov-04 8:16
manasrahfantom12-Nov-04 8:16 
GeneralRe: call card telephony solution! Pin
Colin Angus Mackay12-Nov-04 9:27
Colin Angus Mackay12-Nov-04 9:27 
GeneralRe: call card telephony solution! Pin
Michael P Butler12-Nov-04 9:37
Michael P Butler12-Nov-04 9:37 
GeneralActive Directory LDAP Query Problem Pin
Adam °Wimsatt12-Nov-04 8:02
Adam °Wimsatt12-Nov-04 8:02 
QuestionFlicker-free control resizing ??? Pin
TheSebaster12-Nov-04 7:22
TheSebaster12-Nov-04 7:22 
AnswerRe: Flicker-free control resizing ??? Pin
ACorbs12-Nov-04 19:40
ACorbs12-Nov-04 19:40 
AnswerRe: Flicker-free control resizing ??? Pin
TyronX22-Dec-04 10:54
TyronX22-Dec-04 10:54 
GeneralCreate application setup Pin
Member 87345212-Nov-04 6:51
Member 87345212-Nov-04 6:51 
GeneralRe: Create application setup Pin
MoustafaS12-Nov-04 12:27
MoustafaS12-Nov-04 12:27 
GeneralCommand Parameter Issue Pin
RB@Emphasys12-Nov-04 5:48
RB@Emphasys12-Nov-04 5:48 
GeneralRe: Command Parameter Issue Pin
Richard Deeming12-Nov-04 6:27
mveRichard Deeming12-Nov-04 6:27 
GeneralRe: Command Parameter Issue Pin
RB@Emphasys12-Nov-04 7:54
RB@Emphasys12-Nov-04 7:54 
GeneralDataBind problem Pin
webhay12-Nov-04 3:18
webhay12-Nov-04 3:18 
GeneralRe: DataBind problem Pin
Skynyrd12-Nov-04 3:59
Skynyrd12-Nov-04 3:59 
GeneralRe: DataBind problem Pin
webhay12-Nov-04 4:58
webhay12-Nov-04 4:58 
GeneralRe: DataBind problem Pin
Skynyrd12-Nov-04 10:16
Skynyrd12-Nov-04 10:16 
GeneralRe: DataBind problem Pin
webhay18-Nov-04 4:04
webhay18-Nov-04 4:04 

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.