Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 779183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:53:16+00:00 2026-05-14T19:53:16+00:00

I use the default appdomain (AD) which I use to create new appdomains (AD1)

  • 0

I use the default appdomain (AD) which I use to create new appdomains (AD1) when required for running plugins in isolation.
When creating the new domain I also wire up the AppDomainUnload event to allow me to call clean up code etc.

The issue I seem to have is:

1) Create AD1 from AD

2) Run code in AD1

3) Call AD.Unload(AD1)

The code switches to AD1 and calls the unloading event passing in a reference to the current AppDomain (AD1).

At this point I’d like to get a reference to the current instance running in AD1 to call a shutdown method however there is no GetInstance on the AppDomain class.

Any ideas how I can go about getting it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T19:53:17+00:00Added an answer on May 14, 2026 at 7:53 pm

    When you create the instance in AD1, you could either store the instance in a static variable in the AppDoman, statics are scoped to the AppDomain. Alternatively if this is not a singleton type object, you can maintain a List<> of the objects in the AppDomain.

    You could put this “registration” in the constructor of your plug-in instance. When handling the Unload you can use either the static or enumerate the list and perform the required clean-up on the object(s).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use default_style in my application which is running on Paperclip 2.2.5
which one will be better to use default magic quotes or user defined addslash/stripslash
I have a portlet with my own template and which has <use-default-template>false</use-default-template> in it's
I want to use default keyboard for, but want also that it occurs with
It seems to use default color from Windows settings which is blue by default.
i use default demo with 2 links, and alert, now i included hash and
I use RingtonePreference and would like to use default notification sound as the default
Is it better to use default null or default for text fields in MySQL?
Can I use default arguments in a constructor like this maybe Soldier(int entyID, int
As we use default keyword as a access specifier, and it can be used

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.