This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 83275 - allow to create dispose() helper methods for the designed components
Summary: allow to create dispose() helper methods for the designed components
Status: NEW
Alias: None
Product: javame
Classification: Unclassified
Component: Visual Designer (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Karol Harezlak
URL:
Keywords:
: 81626 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-08-23 13:20 UTC by Martin Brehovsky
Modified: 2008-05-05 16:01 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Brehovsky 2006-08-23 13:20:46 UTC
From the user:

As u may know that in j2me the correct usage of the memory is most important
part.because of the limitation in compact device. while working on my project i
designed about 30 form {till now i test the project on emulators}after
completation of the project i realise that at runtime there can be memory
problem because at same time so many form would required larger memory consider
to j2me devices.so decided to have some mechnasim that shoulddestroy previous
forms and there items when theese are not required. i want to that but there
were not destructors available for forms and item ,so i ave to manually write
code for 30 of screens{form}.its taking so much time .it would have been better
if the netbeen would have provided that feature{form setting the form and its
related items to null}.

currently i am doing as bellow:

public void destroy_firstForm(){        
    firstForm = null;
    FirstFormLabel=null;
    FirstFormTextField=null;
    image=null;
}


----------------

It would be great if  the designer could generate dispose() helper methods for
the designed components - the method would do basically the code from the above
feedback. Each component should have a checkbox in code generation properties,
whether the dipose method should be generated for the component. By default, it
should be false (thus no method being generated).

Also this method is supposed to be called from the user code only, so no other
than described support is planned in the designer.
Comment 1 David Kaspar 2007-07-11 10:40:37 UTC
Designer 1 has been removed. Therefore reassigning to Designer 2 module. Probably this issue will be resolved in the future.
Comment 2 David Kaspar 2007-07-11 10:42:01 UTC
*** Issue 81626 has been marked as a duplicate of this issue. ***
Comment 3 David Kaspar 2007-09-17 13:07:46 UTC
This can be implemented as an additional boolean property on ClassCD based-components. Also a new CodeCleanupPresenter
has to be implemented by all those classes, to generate proper clean-up code. The "destroy" method generation would be
created by the ClassCD.

Very likely it will not be implemented in NB 6.0.