Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

NetHook life in Memory


Recommended Posts

I seem to recall somewhere that CHooks, and NetHooks run from an .ft file, stay in memory after running. If this is the case, would it also mean that

NetHooks either run from "Run User Application" menu, or a NetHook called from another NetHook, are released from memory after they are run ?

 

What Im hoping to do is have the ability to update SOME netHooks without needing to shut down MasterCam ....

Link to comment
Share on other sites

Sorry for the delay as I just noticed this posting...

 

A NETHook is .NET Assembly and being so cannot be "unloaded" as you can with a native (CHook) DLL.

This is a limitation of .NET

 

Google -> "unload .net assembly" and note the top hits...

Yes they are old, but that doesn't mean "out of date" !

 

 

From Jason Zander

Corporate Vice President for the Visual Studio team in the Developer Division at Microsoft.

Why isn't there an Assembly.Unload method?

 

Looking further down in the retrieved pages you'll see mention of using an AppDomain in order to be able to "unload" an Assembly.

There are downsides to that method, which in our case override the need to be able to unload an individuality Assembly while Mastercam is running.

Link to comment
Share on other sites

I mentioned this because I had plans to call a .dll from my post. My concerns were that either from a slowly growing .dll size as it REVs, and/or being called many , many times, that it would bloat up in MasterCam, hogging memory. And also I would lose the ability to dynamically update, without shutting down MasterCam (Its always a fight here to see who gets the MILL 3 licenses :p )

 

Ive since used the 'Launch' command from my post, calling an external .exe. Now I should (hopefully) be able to update at will.

 

Thanx.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...