Click here to Skip to main content
16,007,760 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionOpen a program with a function initiated Pin
szevy_suez3-Jul-06 5:00
szevy_suez3-Jul-06 5:00 
AnswerRe: Open a program with a function initiated Pin
Dave Kreskowiak3-Jul-06 5:05
mveDave Kreskowiak3-Jul-06 5:05 
GeneralRe: Open a program with a function initiated Pin
szevy_suez4-Jul-06 7:24
szevy_suez4-Jul-06 7:24 
QuestionOpen another program/software [modified] Pin
szevy_suez3-Jul-06 4:03
szevy_suez3-Jul-06 4:03 
AnswerRe: initialise another program/software Pin
Duncan Edwards Jones3-Jul-06 4:16
professionalDuncan Edwards Jones3-Jul-06 4:16 
GeneralRe: initialise another program/software Pin
szevy_suez4-Jul-06 7:25
szevy_suez4-Jul-06 7:25 
QuestionDatagrid style Pin
microuser_20003-Jul-06 2:48
microuser_20003-Jul-06 2:48 
QuestionUnloading AppDomain [modified] Pin
matsnas3-Jul-06 1:37
matsnas3-Jul-06 1:37 
Newbi to the whole appdomain-ting but my understanding was that it is a controllable area of a process where I can load code where I can enforce security and at any time unload it.

I want to use it to extend my applications functionallity and at any time given a specific term can unload from memory and eventually restart. This way I could have memory intense parts loaded when I need them instead of all the time.

However I don't get this to work but I'm probably doing some beginners error?1

My code goes something like this:

AppDomainClient<br />
 - Plugin.vb (class implementing AppDomainInterfaces.IPlugin)<br />
<br />
AppDomainInterfaces<br />
 - IPlugin.vb<br />
 - IPluginFactory (Inherits MarshalByRefObject)<br />
<br />
AppDomainApplication<br />
 - MainForm.vb



I start the MainForm by creating an AppDomain. The appdomain object is passed to an instace of the IPluginFactory and used to CreateInstanceAndUnwrap an instance of the Plugin class. The Plugin class is returned as the IPlugin interface to the MainForm. In the constructor of the Plugin class a method EatMemory is called which allocates a very big string. This workes fine and the memory allocated by the application goes through the roof!

When I try to unload the AppDomain I don't get any errors but the memory is still occupied with the same number of bytes as before I ran the unload command:
AppDomain.Unload("MyCustomAppDomain") I was expecting it to decrease mack to what I had before I loaded the Plugin?

-- modified at 7:37 Monday 3rd July, 2006
AnswerRe: Unloading AppDomain [modified] Pin
Dave Kreskowiak3-Jul-06 7:41
mveDave Kreskowiak3-Jul-06 7:41 
GeneralRe: Unloading AppDomain Pin
matsnas3-Jul-06 8:40
matsnas3-Jul-06 8:40 
GeneralRe: Unloading AppDomain Pin
Dave Kreskowiak3-Jul-06 9:22
mveDave Kreskowiak3-Jul-06 9:22 
GeneralRe: Unloading AppDomain Pin
matsnas3-Jul-06 19:46
matsnas3-Jul-06 19:46 
GeneralRe: Unloading AppDomain Pin
Dave Kreskowiak5-Jul-06 1:28
mveDave Kreskowiak5-Jul-06 1:28 
GeneralRe: Unloading AppDomain Pin
matsnas3-Jul-06 20:29
matsnas3-Jul-06 20:29 
QuestionDatetime Pin
vengaqua3-Jul-06 0:01
vengaqua3-Jul-06 0:01 
QuestionPDU format Pin
vengaqua2-Jul-06 23:55
vengaqua2-Jul-06 23:55 
AnswerRe: PDU format Pin
Dave Kreskowiak3-Jul-06 2:57
mveDave Kreskowiak3-Jul-06 2:57 
QuestionSorting Pin
vengaqua2-Jul-06 23:53
vengaqua2-Jul-06 23:53 
AnswerRe: Sorting Pin
Rey99993-Jul-06 2:11
Rey99993-Jul-06 2:11 
QuestionComparing two Objects Pin
alien viper2-Jul-06 23:48
alien viper2-Jul-06 23:48 
AnswerRe: Comparing two Objects Pin
Rey99993-Jul-06 2:08
Rey99993-Jul-06 2:08 
AnswerRe: Comparing two Objects Pin
Dave Kreskowiak3-Jul-06 2:53
mveDave Kreskowiak3-Jul-06 2:53 
Questionif treviewnode's name is blank after rename how to detact Pin
mini87802-Jul-06 23:37
mini87802-Jul-06 23:37 
AnswerRe: if treviewnode's name is blank after rename how to detact Pin
Dave Kreskowiak3-Jul-06 2:50
mveDave Kreskowiak3-Jul-06 2:50 
GeneralRe: if treviewnode's name is blank after rename how to detact Pin
mini87804-Jul-06 1:23
mini87804-Jul-06 1:23 

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.