Tags down


How to clear memory on each execution?

By : aeneas1
Date : September 17 2020, 05:00 AM
I think the issue was by ths following , Load one line from the file and process it. Then load the next! Dont load EVERYTHING into a BIG STRING and then make a array of it then process each occurance of the array.
Once you do this you may well not need to increase the memory limit or the execution time.
code :

ini_set('max_execution_time', 0);
ini_set('memory_limit', '1024M');

//require_once '../../tabkadeh/error_reporting.php';
function setName($name,$photoName, $new_file)
    require_once 'files/lib/WideImage.php';
    require_once 'FarsiGD.php';

    $left = '+50';
    $top  = '+400';

    $bg = WideImage::load($photoName);
    //$final= $bg ->resize(400, 400);
    $final= $bg;
    $canvas = $final->getCanvas();
    //$canvas->useFont('./Yekan.ttf', 200, $final->allocateColor(000, 000, 000));
    $new_name = (new FarsiGD)->persianText($name,'fa', 'normal');
    $canvas->useFont('./Ray-ExtraBlack.ttf', 40, $final->allocateColor(34, 84, 109));
    $canvas->writeText("left $left", "top $top",$new_name);

$file = fopen("Main.txt", "r");
$i = 0;
$line_of_text = '';
while ($line = fgets($file, 4096) !== false) {
    setName(trim($line), './bgbg.jpg', './export/flower_stamp-'.$i.'.jpg');


Share : facebook icon twitter icon

Does std::string::clear and std::list::clear erases data from memory

By : Vasyl Shnayder
Date : March 29 2020, 07:55 AM
hop of those help? The memory isn't overwritten. It is not even guaranteed to be freed.
For example, if you create a huge string and call clear on it, only its size will be reduced, but the allocated memory may still be reserved. However, it will be freed if the string gets out of scope.

How to clear memory from pictures of previous layouts? How to clean memory when go to different layout/activity?

By : Irma
Date : March 29 2020, 07:55 AM
I wish this helpful for you My app consists from 4 layout files, each layout uses a different image as background. I manage to load layout 1 and 2, but after I go to layout 3 I get error "Caused by: java.lang.OutOfMemoryError"
code :
new Button.OnClickListener() {
      public void onClick(View v) {
         Intent intent = new Intent(v.getContext(), secondPage.class);

         yourExistingActivity.finish();  // This will free the memory

public void onDestroy() {

OpenGL 2.0 (Android) - how to clear/reset texture memory or delete selected textures from memory?

By : Max Parker
Date : March 29 2020, 07:55 AM
I hope this helps . So you're looking for a way to delete a texture. You may want to consider the glDeleteTextures function. It takes an array of one or more textures and deletes them.

SKMaps, way to clear in-memory cache for map data when receiving memory warning from iOS?

By : Ulises Osuna
Date : March 29 2020, 07:55 AM
help you fix your problem The size of the map tiles cached on the device could cause the problem. In this case, SKTilesCacheManager class might help you. It provides advanced management for the tiles caching mechanism.

GMSMapView clear doesn't clear memory

By : Nicci Williams
Date : March 29 2020, 07:55 AM
it helps some times Well, this is pain in a**... I not found the official docs.
My solution:
Related Posts Related Posts :
  • How to get A Specifc Key => value pair from an assosative array in Php
  • Web scrapping using Yii framework
  • Auth::attempt() trowing an error saying "Call to undefined method Illuminate\Auth\TokenGuard::attempt()" in La
  • If and Else if not working within while loop. Just actions first if execution
  • Remove Specific Route from Login Laravel 6
  • PHP databases problem with displaying data
  • Insert data to specific table, but got an error in another table in Lumen 5.8
  • Slow PHP Routine
  • Efficient way to check record uniqueness during bulk insert in MySql
  • MariaDB SQL Syntax Error - "right syntax to use near 'order("
  • Laravel 6.4.1 SQLSTATE[HY000] [2002] Connection refused
  • XML Response - access certain fields
  • htaccess specific url change from xx.com/course?id=1 to xx.com/1 in core php using <a> tag
  • How to count the field name start with same prefix when submit the form?
  • how to query database for each day in an array of days laravel
  • Filling grid/array randomly
  • Can Vue + Laravel be used to make non-single page applications?
  • Is it good practice to make more than 8 ajax call at a time on single submit button event?
  • How add multiple packages for PayPal recurring payment with different billing cycle & amount using paypal rest-api-s
  • Error laravel 5.8 installing package (Installation failed, reverting ./composer.json to its original content.)
  • Object of class CURLFile could not be converted to string
  • Are there any security risks from user generated inline css
  • Difference between command line cURL and PHP cURL
  • How to convert array to specific Json format
  • Laravel: You cannot serialize or unserialize PDO instances when sending notifications
  • How to use href link to checked in option?
  • Symfony: Access an unmapped form field from a CollectionType in Controller
  • Query FailedYou have an error in your SQL syntax
  • Typo3 Introduction Package version 9.5
  • Connect laravel container to existing mysql container via docker compose
  • MySQL and PHP INSERT is not inserting into Database
  • Use of ::class method
  • How to get select value text with Laravel?
  • I created laravel package and required my package in other project.I use package trait in project model. But i get this
  • On every click link changes in blade view
  • laravel access outer query column inside subquery
  • How to validate a name by time wise in laravel
  • I want to convert a post method form to curl command
  • Check if a day and month based date is in between two other dates in PHP
  • PHP json decode array reverse
  • Modifying a variable passed to a PHP anonymous function doesn't appear to be reflected in variables original scope
  • Merge or combine N (6) lines of text in one array repeatedly with php
  • Undefined variable: categories in Blade Laravel 6.4.0
  • How can I had a cron-job Command using php artisan?
  • How to skip to next "elseif" in PHP statement?
  • Exclude strings from search PhpStorm
  • Laravel: How to fix laravel new project error?
  • Find input type with PHP
  • How to display multiple table from signle query on webpage using php
  • Laravel 6.4: __toString() must return a string value
  • How do I determine datatype of input values that am getting from my html form so that I can use them to bind parameters
  • PHP gnupg_addsignkey Error: get_key failed
  • How to access a variable value in another view in blade template?
  • How to use variable into password_hash second argument?
  • How can I create a zero DateTime with php?
  • Remove numbers in string php
  • SQLSTATE[HY000]: General error: 1364 Field 'parent_id' doesn't have a default value
  • @if (request::is("/")) doesnt work laravel
  • How do I determine the line number where a string exists in a text file?
  • Using A HREF in a while loop to send data from my database to another page
  • shadow
    Privacy Policy - Terms - Contact Us © 35dp-dentalpractice.co.uk