fatcoder
Member
|
Is del() required before a second create()
Quick question. I'm just wondering if it is necessary to call del() (on interfaces that provide it) before calling create() if you have already previously called create()?
For example, if you call create2D() on an image and then latter on need to recreate the image again, do you need to call del() on the image before calling create2D() again?
I know that del() is freeing resources, so I'm just wondering if by calling create2D() a second time without calling del(), will it leave behind some orphaned resources or does EE call del() for me when recreating something.
(This post was last modified: 01-06-2012 12:58 AM by fatcoder.)
|
|
01-06-2012 12:57 AM |
|
Esenthel
Administrator
|
RE: Is del() required before a second create()
Manual calling del is NOT needed
|
|
01-06-2012 02:36 AM |
|
JonathonA
Member
|
RE: Is del() required before a second create()
.del() calls are not needed at all?
|
|
01-10-2012 11:58 PM |
|
fatcoder
Member
|
RE: Is del() required before a second create()
(01-10-2012 11:58 PM)JonathonA Wrote: .del() calls are not needed at all?
No, calling del() is not required before calling create() a second time. Here's how I'm assuming it works.
create() <- first time
del() <- not needed here
create() <- recreate object second time (del called internally)
del() <- should be called when finished with object
|
|
01-11-2012 01:31 AM |
|
Esenthel
Administrator
|
RE: Is del() required before a second create()
For most objects last del is also not needed
I mostly recommend calling del for global Thread objects to be stopped at custom position
It's not needed because you can see that destructors already call del
Investigate tutorials you will notice del is almost never called manually
|
|
01-11-2012 12:04 PM |
|
fatcoder
Member
|
RE: Is del() required before a second create()
Ok, good to know.
|
|
01-11-2012 12:54 PM |
|