Problem Removing FocusManager from Memory
Ok, so I have a class that I use as a menu for my program. It has some Flash components and an instance of FocusManager in it. My base class instantiates this class collects the data from the user via the components and then removes the class and continues on with the program. The problem is that after I remove it and move on it is still being held in memory. The file I am using now was created in Flash CS4 and I then I run the profiler on it in Flash Builder 4. After I take the two snap shots and look at the loitering objects I can see that the FocusManager is still there and it is keeping my class there. Here is what the class looks like (I made it simple test one that does what the class from my application is doing):
package
import fl.managers.FocusManager;
import flash.display.Sprite;
public class TestMenu extends Sprite
private var fm:FocusManager;
public function TestMenu()
init();
private function init():void
//Add code
public function activateFM():void
fm = new FocusManager(this);
public function clearFocus():void
fm.deactivate();
fm = null;
Is there something else that I am not doing? If anyone has some insight into this I would greatly appreciate it.
What I meant is that instead of using whatever erase functionality (I wouldn't know one), the code inside the function modules of FG1 should clear all global data with CLEAR and REFRESH statements before returning to the calling program. Even better would be to not use any global data in FG1 in the first place, if possible, rather work with local data declarations only inside the function modules.
Thomas
Similar Messages
-
Hi I am having problems removing mail from trash folder. Can anyone help please
Hi I am having problems removing mail from trash folder. I can send mails to the folder but cannot delete them permanently from the trash folder. I am using Iphone 3G and anm up to date with OS. Can anyone help please
Check that there isn't a different Trash folder to the one with the proper Trash symbol on it.
If you see one in your list of folders rather than a separate one, highlight it, then click on Mailbox...Use this mailbox for...Trash -
I am having problem removing sim from E51
I have problems removing sim from my E51. it seems. its very tight there.
Did you already try these steps?
Restart the iPhone.
Try another means of reaching the activation server and attempt to activate.
Try connecting to a known-good Wi-Fi network if you're unable to activate using a cellular data connection.
Try connecting to iTunes if you're unable to activate using Wi-Fi.
Restore the iPhone.
If you receive an alert message when you attempt to activate your iPhone, try to place the iPhone in recovery mode and perform a restore. If you're still unable to complete the setup assistant due to an activation error, contact Apple for assistance.
copied from iOS: Troubleshooting activation issues -
Having problems removing tags from script.
I'm not using the browser to run Adobe Story, but the Desktop version from my iMac. Cmd + Double Click works, but once every 30 times. Is anyone else having this problem removing tags from a script?
There are other ways to remove tags from a script
From Tagging Panel:
- Open Tagging Panel from View Menu
- Click on Edit button. Here you have the option to delete individual tag-items or remove all from the scene.
From File Menu
- Open File - Tagging menu
Here you will find the options to delete all/manually added/automatically added tags. -
Problem removing components from JLayeredPane
Hi all,
I have a problem showing and hiding components on a JLayeredPane. It goes Something like this:
In my application I have a button. When this button is pressed I use getLayeredPane to get the frames layered pane. I then add a JPanel containing a number of labels and buttons onto that layered pane on the Popup layer. The panel displays and funcitons correctly.
The problem comes when I try to remove the panel from the layered pane. The panel does not dissappear and I am no longer able to click on anything else in the frame!
If anyone has any ideas how to get around this or what the problem might be I'd be very greatful to hear it. Sample code follows:
* Called when the button on the frame is pressed:
* @param e
public void actionPerformed(ActionEvent e)
JLayeredPane mLayredPane = getLayeredPane();
int x = 0, y = 0;
Container c = this;
while (true)
c = c.getParent();
if (c != null)
x += c.getLocation().x;
y += c.getLocation().y;
if (c instanceof JRootPane)
break;
else
break;
mPanel.setBounds(x, y, 235, 200);
mLayredPane.add(mPanel, JLayeredPane.POPUP_LAYER);
//And when a listener fires from the panel I use
mLayredPane.remove(mPanel);
//To remove it from the layered pane and in theory return the
//app to the state it was before the panel was displayedThanks again...The problem is you only removed it within the program, without actually removing it from the display. If that makes any sense, or whether thats your problem at all.
If you are only using this line.
mLayredPane.remove(mPanel);
I think if you tell it to repaint and revalidate it should work, though i have never used LayeredPane.
mLayredPane.repaint();
mLayredPane.revalidate(); -
Removing items from memory using loop
The following for loop removes children from their parent if
they're in the display list. It works correctly, but I also want to
remove each child from memory with the same loop. I can't get it to
work correctly however.I have tried multiple items in the loop to set each child to
null before or after it's removed.
Here are some:
this.child = null;
var target = this.getChildAt(0);
target = null; -
Does PopUpManager "close" event remove PopUp from memory?
I'm using a lot of popup windows (in addition to tooltips) in an application. Does the PopUpManager's close event remove the popup from memory? If not, I'd like to find out how this could be done.
Thanks.on close, you need to call PopupManager.removePopup(this) here this is the popup. and make sure that this popup does not have any strong references/event handlers listening to custom events /events
-
Problem removing folder from Lightroom
HI,
I'm new to Lightroom (using 5) and I am trying to get some photo uploads organized. When I imported them, they came in a folder that was poorly organized so I moved them into folders that I preferred. That was fine. BUT now the original folder in lightroom is empty (I deleted from finder after emptying it) and when I remove it from my lightroom ALL the other folders go with it. The funny part is, the total picture count still shows that all the pictures are in lightroom and accounted for, but the folders are no longer there and accessible.
I have attached a screen shot of the folders. I would like to remove the 2014 folder at the top, but when I do, the desktop folder and everything under it goes as well. Why? And how do i prevent that from happening? THANKS!!
Ultimately, I would like to move the 2014 folder from being on the desktop as well.
IYour lack of tact was a little bit insulting, regardless of when it happened. No big deal though. I digress.
Since you cannot view folders in iTunes, you cannot delete folders thru iTunes.
You could put all the songs you want to delete into a playlist then select all the songs and Command Delete to delete them all at once.
That's the point. There should be an easier way. But putting them into a playlist before deleting them would be even more work than just deleting them the first time you click them. So this isn't really helpful either.
Ed's answer was helpful because he addressed the concerns of the original poster. But it also illustrated the need for iTunes programmers to include a feature to remove a folder from your iTunes library as easily as you can add them. If the best way to remove 200GB worth of music from your itunes library is to change the file extensions, then click to delete every single file with an exclamation point next to it; there is quite simply a flaw in design.
Apple iTunes programmers need to make the adjustment. Right next to the "File" command: "Add folder to library", you could have a command to "Remove folder from library." Or a "Manage Library" option would be great. Itunes obviously knows what folders it's library consists of so why not allow it to populate a list of them with the option to deselect undesired folders? Why hasn't this been done in one of the numerous iTunes updates? Is it really that hard to understand? -
I've written a VI using VI Scripting that creates an Enum based on an array of Names. For example, if I have an array with "Initialize", "Process", "Exit", I can create a control "State.ctl" consisting of an Enum with these values.
The trouble comes from wanting to "redo" (i.e. re-run) this VI, say because I want to add another state, "Clean-up". If the original VI is in memory (because I'm developing code, and have used it), when I run my Create Enum script, it gives Error 1357 when it tries to write State.ctl, saying it is already in memory. One solution is to exit LabVIEW, restart, and run fresh, with the control-to-be-overwritten not (yet) in memory.
Is there a way to Have My Cake and Eat It, Too? Can I write a VI that will inquire if State.ctl is in memory (for example, by wiring just the name to an Open VI Reference and seeing if there is no error, which means it's in memory) and then purging it from memory? If so, I could avoid the 1357 error.
BSThe All VIs in Memory App property will tell you whether or not the control is still in memory. Alternately, you can try opening it with just the name instead of a full path. If it is in memory, the open will succeed. If the open succeeds, just add the new item. If not, create the whole thing.
Closing something in memory is tricky, since LabVIEW has all sorts of optimizations to keep things in memory and so avoid reloading. You would need to ensure all callees are closed, at the least. You could do this by recursively calling the VI property Caller's Names until you get to the top. Close everything and it should eventually go out of memory.
This account is no longer active. Contact ShadesOfGray for current posts and information. -
Problem removing rows from JTable
Hello,
I'm having an issue with a JTable that I'm using. At one point in my application, I want to remove all the rows from the table and regenerate them (from a database). When I try to remove the rows and do nothing else, they remain in the table. The rows are being removed from the model, as I have verified this in code, but the display does not refresh at all.
I am using custom renderers to change the background color of a cell based on its value, and I disabled them to see if that was the problem, but alas, it is not.
Any suggestions or ideas why this may be occurring?I am using model.setRowCount(0); to clear the model, however the display never refreshes. Then you are doing something wrong because its that simple. Only a single line of code is required.
Perhaps I should have included this in my original post.Actually, you should have included demo code in your original post. That way we don't have to guess what you are doing.
If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting. -
Cannot remove JTable from memory
Hi,
I am new to this forum so please forgive me if I make some naive errors. We are developing a component-based software in which the GUI can respond to a user's click to show a JTable in a JPanel. Because the loading of the JTable might take a while since some of our data can have a million columns (I cannot help that), we used a thread to manage the loading of the JTable. So the process is as followed:
1. In a method called "invokeThread", we first get an instance of the JTable as in the code (IVComponent is an interface that our JTable-derived table implements):
final IVComponent returnComponent = VComponentLoader.getVisualization(tableName);2. Then in the method "invokeThread", we start a thread and uses the SwingUtilities.invokeLater() to load the JTable:
Thread executeThread = new Thread ("Table Thread") {
public void run () {
SwingUtilities.invokeLater (new Runnable () {
public void run () {
loadTable(returnComponent);
executeThread.start ();3. The "loadTable" method is in the same class as the "invokeThread" class. It loads data into the JTable.
This works fine to load the data into the JTable. However, once the JTable's use is finished and the user wants to get rid of it to save on JVM memory, we allow the user to delete that JTable. Now the reason I am asking for help is that although we can set the JTable to null or set its TableColumnModel to null before setting JTable to null, we found that the TableColumns in the TableColumnModel are still on the heap using Eclipse's memory analyzer or Netbean's profiler. We were surprised that neither tool told us which object held them in memory, though.
We have looked on the web for a while. First we thought the "final" keyword might be the problem but using an instance variable for the class in which the method "invokeThread" resides did not help. We have seen other people reporting similar issues with other swing components but has yet to find a solution or a work-around that works for us.
Thanks in advance for your help.
JohnThanks, PhHein. If we can bribe the GC, we will :-).
I guess my question is whether this is something we need to do to ensure that GC will collect the memory once we set the JTable to null. From what we gathered on the web, one possible reason for the GC not to touch the JTable is that there is another reference to the JTable object (or its sub-components?) that we are not aware of. We saw a few posts mentioning the listeners added by a static object. Don't know if it applies to our situation because although we did not add any listener this way, we don't know whether by using JTable and TableColumnModel, a listener is added for us by a static object.
With limited exposure to the development community, we don't know the scope of the issue we encountered. We have seen a few bug reports in sun development network but they were quite old. If this is a well-known issue for Swing components that is yet to be fully addressed, then we have to bite the bullet for now. If there is a solution either offered by sun or by some experts, we will be grateful if you guys can point the way.
Best,
John -
Remove apps from memory after use
on iphone 4 I could tap home button twice, touch line of active apps and remove from active memory
how do equivalent with iphone 5The same way.
For iOS 7: Double tap the Home Button and swipe up on thwe app preview page -
Problem removing Objects from the stage in Flash CS4 (AS3.0)
I have a problem with this code:
this.addEventListener(Event.ENTER_FRAME, vanish);
function vanish(event:Event):void{
if(character_mc.hitTestObject(vanish_mc)){
vanish_mc.parent.removeChild(vanish_mc);
There are two overlapping objects on my stage: character_mc and vanish_mc.
As soon as i start the scene[Ctrl+Enter] vanish_mc is VISUALLY removed. But the code still sees a collision somehow. How can i Entirely remove the object vanish_mc?
Thank you for help and advice.Ah I think the problem is what my problem not which I proposed, my bad I was trying to keep it simple.
the remove code in my problem actually looks like this:
if(character_mc.hitTestObject(this["dollar_mc_"+String(i)])){
removeChild(this["dollar_mc_"+String(i)]);
I wanted it to be that way so I could add infinite "dollar_mc_" ' s without writing myself to death with code and or getting confused.
Imagine it like a game where a character it picking up dollars, which would disappear once they intersect.
And that exactly is what gives me that argument.
Do you know a way i could write this code, or do you suggest to leave it that way...because it does run and work im just getting this argument while debugging.
Thank you for all the help~ -
Problem removing children from within an event handler
I'm trying to remove a movie clip from an onComplete handler.
When I try to do this I get the following error
"ArgumentError: Error #2025: The supplied DisplayObject must
be a child of the caller."
The point where my loader is complete is the time that I have
to remove this movieclip.
Would any body be able to tell me what the error means and
help me with a way around it?
Thanks
dubYou can always do it this way -- doesn't matter which display
list the object is in. -
Problem removing bundles from group with ZLMAN
I am having trouble removing a bundle from a bundlegroup with the zlman utility. The syntax I am using seems correct and the groups and bundle name are also.
Here is the command and it's output from the command with the debug option: (if I use a bogus name for the package the output will tell me that the bundle was removed successfully :-)
This ZLM72IR2 with Hot-Patch 3
Any ideas?
Thanks
command:
zlman bgr -U administrator -P xxxxxx -V -d Patches/Servers/sles10-sp1/Pre-Prod-security patch-slesp1-yast2-core-4623_SLES10-SP1-Updates
output:
com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIFault={_Message=An error occurred while trying to remove the grouping data.,_Type=5}
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Construc tor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIFaultMarshaler.deserialize(CoreAPIFaultMarsh aler.java:35)
at com.sssw.jbroker.web.soap.LiteralEncodingStyle.rea dObject(LiteralEncodingStyle.java:433)
at com.sssw.jbroker.web.soap.LiteralEncodingStyle.rea dObject(LiteralEncodingStyle.java:410)
at com.sssw.jbroker.web.soap.LiteralEncodingStyle.rea dObject(LiteralEncodingStyle.java:372)
at com.sssw.jbroker.web.core.InputStreamImpl.readObje ct(InputStreamImpl.java:278)
at com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIBinding_Stub.removeMembers(CoreAPIBinding_St ub.java:2682)
at com.novell.zenworks.zlman.commands.Commands.groupR emove(Commands.java:598)
at com.novell.zenworks.zlman.commands.BundleCommands. execute(BundleCommands.java:1286)
at com.novell.zenworks.zlman.ZLMan.main(ZLMan.java:28 0)
Caused by: com.sssw.jbroker.web.portable.ApplicationException
at com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIBinding_Stub.removeMembers(CoreAPIBinding_St ub.java:2689)
... 3 more
[5] Fatal Error: An error occurred while trying to remove the grouping data.brunold,
I created a bundlegroup called Testbundle directly under the /Bundles container and tried to remove a couple of different patches. The results were the same. My server is SLES10SP2 64-bit by the way.
Thanks,
Frank
zlman bgr -U administrator -P dnctl2RA -V -d Testbundle patch-slesp1-915resolution-4728_SLES10-SP1-Updates
com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIFault={_Message=An error occurred while trying to remove the grouping data.,_Type=5}
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Construc tor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIFaultMarshaler.deserialize(CoreAPIFaultMarsh aler.java:35)
at com.sssw.jbroker.web.soap.LiteralEncodingStyle.rea dObject(LiteralEncodingStyle.java:433)
at com.sssw.jbroker.web.soap.LiteralEncodingStyle.rea dObject(LiteralEncodingStyle.java:410)
at com.sssw.jbroker.web.soap.LiteralEncodingStyle.rea dObject(LiteralEncodingStyle.java:372)
at com.sssw.jbroker.web.core.InputStreamImpl.readObje ct(InputStreamImpl.java:278)
at com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIBinding_Stub.removeMembers(CoreAPIBinding_St ub.java:2682)
at com.novell.zenworks.zlman.commands.Commands.groupR emove(Commands.java:598)
at com.novell.zenworks.zlman.commands.BundleCommands. execute(BundleCommands.java:1286)
at com.novell.zenworks.zlman.ZLMan.main(ZLMan.java:28 0)
Caused by: com.sssw.jbroker.web.portable.ApplicationException
at com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIBinding_Stub.removeMembers(CoreAPIBinding_St ub.java:2689)
... 3 more
[5] Fatal Error: An error occurred while trying to remove the grouping data.
zlmprd1:/var/opt/novell/zenworks/scripts/movepatches # zlman bgr -U administrator -P dnctl2RA -V -d Testbundle patch-slesp1-915resolution-4728_SLES10-SP1-Updates
com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIFault={_Message=An error occurred while trying to remove the grouping data.,_Type=5}
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Construc tor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIFaultMarshaler.deserialize(CoreAPIFaultMarsh aler.java:35)
at com.sssw.jbroker.web.soap.LiteralEncodingStyle.rea dObject(LiteralEncodingStyle.java:433)
at com.sssw.jbroker.web.soap.LiteralEncodingStyle.rea dObject(LiteralEncodingStyle.java:410)
at com.sssw.jbroker.web.soap.LiteralEncodingStyle.rea dObject(LiteralEncodingStyle.java:372)
at com.sssw.jbroker.web.core.InputStreamImpl.readObje ct(InputStreamImpl.java:278)
at com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIBinding_Stub.removeMembers(CoreAPIBinding_St ub.java:2682)
at com.novell.zenworks.zlman.commands.Commands.groupR emove(Commands.java:598)
at com.novell.zenworks.zlman.commands.BundleCommands. execute(BundleCommands.java:1286)
at com.novell.zenworks.zlman.ZLMan.main(ZLMan.java:28 0)
Caused by: com.sssw.jbroker.web.portable.ApplicationException
at com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIBinding_Stub.removeMembers(CoreAPIBinding_St ub.java:2689)
... 3 more
[5] Fatal Error: An error occurred while trying to remove the grouping data.
Maybe you are looking for
-
How do I find out what the "other" programs are on my computer. It is slowing the system down. I am wondering if it is one of my kids graphic games. The system is so slow and maxed out but not sure what the item(s) is that is clogging up the stroa
-
External monitor issues after upgrade to Mountain Lion
MacBook Pro 5,4, upgraded to Mountain Lion 10.8.5 when installing replacement SSD. Trying to connect to Vizio VMM26F tv/monitor in dual monitor display. In the past, under Lion, this monitor worked flawlessly with MiniDisplay to DVI adpater/cable. (I
-
In SMS while texting my return key is now the send key with the new update. Why? How do I get the return/enter key back? Is this intended?
-
How to get drivers and download drivers for my HP 2000-261NR notebook?
I need to download all the original drivers for my HP notebook so that they may be reinstalled on a new hard drive. The old hard drive failed. A new harddrive and Windows 7 64 bit OS have already been installed. The HP support website locks up in a
-
Can't seem to re-install Classic support
I have been preparing an old PowerMac G4 to give to a friend. I erased the hard-drive and did a clean install of Tiger, and updated it. I'm now trying to re-install Classic support (so I can occasionally go to her house and run one of my OS9 apps