# Actor Classes vs. IC.create\_canister()

**URL:** <https://forum.dfinity.org/t/actor-classes-vs-ic-create-canister/35943>\
**Category:** Motoko\
**Created:** [October 7, 2024, 11:06pm UTC](https://forum.dfinity.org/t/actor-classes-vs-ic-create-canister/35943 "2024-10-07T23:06:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexpowmow](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alexpowmow/32/22909_2.png) [@alexpowmow](https://forum.dfinity.org/u/alexpowmow)\
**Post date:** [October 7, 2024, 11:06pm UTC](https://forum.dfinity.org/t/actor-classes-vs-ic-create-canister/35943/1 "2024-10-07T23:06:47Z")

</div>

I am a bit confused on the difference between using an actor class to create a canister vs. using the IC Management canister to create a canister (IC.create\_canister()) and then using the install\_code() function to load in the WASM.

Is the biggest difference just that with actor class you do not need to also install the WASM, making it simpler to create new canisters dynamically? Is a canister created using an actor class COMPLETELY separate from the canister that created it (Has its own 4GiB of Heap Memory and does not take up any memory in the parent actor)? Is there any drawback using an actor class vs IC.create\_canister()?

Also, once a canister is created dynamically what is the best way to go about upgrading them?

---

<div class="post-metadata">

**Author:** ![claudio](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/claudio/32/322_2.png) [@claudio](https://forum.dfinity.org/u/claudio)\
**Post date:** [October 8, 2024, 10:23am UTC](https://forum.dfinity.org/t/actor-classes-vs-ic-create-canister/35943/2 "2024-10-08T10:23:54Z")

</div>

> Is the biggest difference just that with actor class you do not need to also install the WASM, making it simpler to create new canisters dynamically?

Yes.

> Is a canister created using an actor class COMPLETELY separate from the canister that created it (Has its own 4GiB of Heap Memory and does not take up any memory in the parent actor)? Is there any drawback using an actor class vs IC.create\_canister()?

Yes, it’s completely separate canister (compiled with the same flags as the main actor).  
The actor that instantiates the class is the controller of the instance (IIRC).

The main drawback is that the wasm for the canister is embedded in the wasm of the importing actor or actor class, bloating the main actor a bit, and you cannot vary the compiler arguments (e.g. the parent and child will use the same gc algorithm, for example).

> Also, once a canister is created dynamically what is the best way to go about upgrading them?

Yes, that’s a bit tricky, but there is some support for that (we still need write up some tutorial style documentation though).

Related links:

Post:

> [@Actor Class Management](https://forum.dfinity.org/t/actor-class-management/26917/4):
>
> @kentosugama gave a demo here: [[Global R&D - August 2022] ](https://www.youtube.com/watch?v=RofWXtHLcwo&t=3531s) I think it starts around 1h:06m

Reference documentation

> **[Language reference | Internet Computer](https://internetcomputer.org/docs/current/motoko/main/reference/language-manual#actor-class-management)**
>
> \<!--
