Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6634113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:53:31+00:00 2026-05-25T22:53:31+00:00

I have a picture array that is stored globally. Every second I choose a

  • 0

I have a picture array that is stored globally. Every second I choose a picture on the screen, fade it out, and replace it with a picture from the array. I use: $("#picture" + picture.id).remove() to remove the current picture from the screen. Then I use

$(".pictureframe").prepend(

<div id="picture+picture.id" class="imageframe" style="opacity:0; left:x px; top:y px;" >
    <img class="image" width="picture.width" height="picture.height" src="picture.source" />
</div>

);

I removed all the escaping to make it easier to read. picture is the object so picture.id is the pictures id. The problem is that having the page open (and the only one open) kills browser memory. I get to 1.4gb usage with just that page. I imagine that the browser is creating a clone of the image every time it gets reinserted. Is there a garbage collector delete function I can call on the DOM elements I removed? How would I do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T22:53:32+00:00Added an answer on May 25, 2026 at 10:53 pm

    The way I would go about doing it is to have all the images there at once, but with all-but-one of them set to display: none, then fade them in/out as needed. This way there’s no real DOM manipulation, only styles, and memory won’t leak out of your computer’s USB ports :p

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A cancer CT picture is stored inside a unsigned short array (1-dimensional). I have
I have a picture that I need to resize to a specific dimension and
I have a small assignment where I have to use a 2d array to
I have a byte array representing a picture. I want to present the picture
I have an array that represents a grid For the sake of this example
I have a 3D array that I'm accessing this way Array(int x, int y,
I have a JSon array that displays in a JQuery Mobile list. It shows
I have an array of an object type that has different text fields to
I have a callback from an ajax call that returns a bunch of image
i have an array that looks like this: foreach($obj as $key => $value) {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.